mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	Entity-ify a passel of & < > characters. Per gripe from Devrim.
This commit is contained in:
		
							parent
							
								
									f538329f9d
								
							
						
					
					
						commit
						4c128303e0
					
				| @ -19,7 +19,7 @@ | |||||||
|    -- create index |    -- create index | ||||||
|    CREATE INDEX testidx ON test USING gist (a); |    CREATE INDEX testidx ON test USING gist (a); | ||||||
|    -- query |    -- query | ||||||
|    SELECT * FROM test WHERE a < 10; |    SELECT * FROM test WHERE a < 10; | ||||||
|   </programlisting> |   </programlisting> | ||||||
|  </sect2> |  </sect2> | ||||||
|   |   | ||||||
|  | |||||||
| @ -287,28 +287,28 @@ a = b                Same as | |||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| a && b                Overlaps | a && b                Overlaps | ||||||
|   </programlisting> |   </programlisting> | ||||||
|   <para> |   <para> | ||||||
|    The cubements a and b overlap. |    The cubements a and b overlap. | ||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| a @> b                Contains | a @> b                Contains | ||||||
|   </programlisting> |   </programlisting> | ||||||
|   <para> |   <para> | ||||||
|    The cubement a contains the cubement b. |    The cubement a contains the cubement b. | ||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| a <@ b                Contained in | a <@ b                Contained in | ||||||
|   </programlisting> |   </programlisting> | ||||||
|   <para> |   <para> | ||||||
|    The cubement a is contained in b. |    The cubement a is contained in b. | ||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <para> |   <para> | ||||||
|    (Before PostgreSQL 8.2, the containment operators @> and <@ were |    (Before PostgreSQL 8.2, the containment operators @> and <@ were | ||||||
|    respectively called @ and ~.  These names are still available, but are |    respectively called @ and ~.  These names are still available, but are | ||||||
|    deprecated and will eventually be retired.  Notice that the old names |    deprecated and will eventually be retired.  Notice that the old names | ||||||
|    are reversed from the convention formerly followed by the core geometric |    are reversed from the convention formerly followed by the core geometric | ||||||
| @ -326,8 +326,8 @@ a <@ b                Contained in | |||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| [a, b] < [c, d]                Less than | [a, b] < [c, d]                Less than | ||||||
| [a, b] > [c, d]                Greater than | [a, b] > [c, d]                Greater than | ||||||
|   </programlisting> |   </programlisting> | ||||||
|   |   | ||||||
|   <para> |   <para> | ||||||
| @ -462,10 +462,10 @@ a <@ b                Contained in | |||||||
|        is useful for creating bounding boxes around a point for searching for |        is useful for creating bounding boxes around a point for searching for | ||||||
|        nearby points. All defined dimensions are changed by the radius. If n |        nearby points. All defined dimensions are changed by the radius. If n | ||||||
|        is greater than the number of defined dimensions and the cube is being |        is greater than the number of defined dimensions and the cube is being | ||||||
|        increased (r >= 0) then 0 is used as the base for the extra coordinates. |        increased (r >= 0) then 0 is used as the base for the extra coordinates. | ||||||
|        LL coordinates are decreased by r and UR coordinates are increased by r.  |        LL coordinates are decreased by r and UR coordinates are increased by r.  | ||||||
|        If a LL coordinate is increased to larger than the corresponding UR  |        If a LL coordinate is increased to larger than the corresponding UR  | ||||||
|        coordinate (this can only happen when r < 0) than both coordinates are  |        coordinate (this can only happen when r < 0) than both coordinates are  | ||||||
|        set to their average. To make it harder for people to break things there  |        set to their average. To make it harder for people to break things there  | ||||||
|        is an effective maximum on the dimension of cubes of 100. This is set  |        is an effective maximum on the dimension of cubes of 100. This is set  | ||||||
|        in cubedata.h if you need something bigger. |        in cubedata.h if you need something bigger. | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.220 2007/11/27 16:46:36 momjian Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.221 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="datatype"> |  <chapter id="datatype"> | ||||||
|   <title id="datatype-title">Data Types</title> |   <title id="datatype-title">Data Types</title> | ||||||
| @ -3440,10 +3440,10 @@ SELECT 'fat:ab & cat'::tsquery; | |||||||
|      function is convenient for performing such normalization: |      function is convenient for performing such normalization: | ||||||
| 
 | 
 | ||||||
| <programlisting> | <programlisting> | ||||||
| SELECT to_tsquery('Fat:ab & Cats'); | SELECT to_tsquery('Fat:ab & Cats'); | ||||||
|     to_tsquery     |     to_tsquery     | ||||||
| ------------------ | ------------------ | ||||||
|  'fat':AB & 'cat' |  'fat':AB & 'cat' | ||||||
| </programlisting> | </programlisting> | ||||||
|     </para> |     </para> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.79 2007/12/03 04:59:55 tgl Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.80 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
| <chapter id="ddl"> | <chapter id="ddl"> | ||||||
|  <title>Data Definition</title> |  <title>Data Definition</title> | ||||||
| @ -2312,7 +2312,7 @@ VALUES ('New York', NULL, NULL, 'NY'); | |||||||
| 
 | 
 | ||||||
|     <para> |     <para> | ||||||
|      To set up a partitioned table, do the following: |      To set up a partitioned table, do the following: | ||||||
|      <orderedlist spacing=compact> |      <orderedlist spacing="compact"> | ||||||
|       <listitem> |       <listitem> | ||||||
|        <para> |        <para> | ||||||
|         Create the <quote>master</quote> table, from which all of the |         Create the <quote>master</quote> table, from which all of the | ||||||
| @ -2430,7 +2430,7 @@ CREATE TABLE measurement ( | |||||||
|     </para> |     </para> | ||||||
| 
 | 
 | ||||||
|     <para> |     <para> | ||||||
|      <orderedlist spacing=compact> |      <orderedlist spacing="compact"> | ||||||
|       <listitem> |       <listitem> | ||||||
|        <para> |        <para> | ||||||
|         The master table is the <structname>measurement</> table, declared |         The master table is the <structname>measurement</> table, declared | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/dml.sgml,v 1.16 2007/02/01 00:28:16 momjian Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/dml.sgml,v 1.17 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
| <chapter id="dml"> | <chapter id="dml"> | ||||||
|  <title>Data Manipulation</title> |  <title>Data Manipulation</title> | ||||||
| @ -135,7 +135,7 @@ INSERT INTO products (product_no, name, price) VALUES | |||||||
| 
 | 
 | ||||||
|   <para> |   <para> | ||||||
|    To perform an update, you need three pieces of information: |    To perform an update, you need three pieces of information: | ||||||
|    <orderedlist spacing=compact> |    <orderedlist spacing="compact"> | ||||||
|     <listitem> |     <listitem> | ||||||
|      <para>The name of the table and column to update,</para> |      <para>The name of the table and column to update,</para> | ||||||
|     </listitem> |     </listitem> | ||||||
|  | |||||||
| @ -114,7 +114,7 @@ | |||||||
|      </entry> |      </entry> | ||||||
|     </row> |     </row> | ||||||
|     <row> |     <row> | ||||||
|      <entry><literal><@></literal> operator</entry> |      <entry><literal><@></literal> operator</entry> | ||||||
|      <entry>gives the distance in statute miles between |      <entry>gives the distance in statute miles between | ||||||
|       two points on the Earth's surface. Coordinates are in degrees. Points are |       two points on the Earth's surface. Coordinates are in degrees. Points are | ||||||
|       taken as (longitude, latitude) and not vice versa as longitude is closer  |       taken as (longitude, latitude) and not vice versa as longitude is closer  | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.84 2007/11/07 12:24:23 petere Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.85 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
| <chapter id="ecpg"> | <chapter id="ecpg"> | ||||||
|  <title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title> |  <title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title> | ||||||
| @ -4695,7 +4695,7 @@ cc -o myprog prog1.o prog2.o ... -lecpg | |||||||
| ECPG = ecpg | ECPG = ecpg | ||||||
| 
 | 
 | ||||||
| %.c: %.pgc | %.c: %.pgc | ||||||
|         $(ECPG) $< |         $(ECPG) $< | ||||||
| </programlisting> | </programlisting> | ||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.414 2007/11/28 15:42:31 petere Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.415 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="functions"> |  <chapter id="functions"> | ||||||
|   <title>Functions and Operators</title> |   <title>Functions and Operators</title> | ||||||
| @ -7752,15 +7752,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple | |||||||
|         <entry><literal><function>to_tsquery</function>(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">query</> <type>text</type>)</literal></entry> |         <entry><literal><function>to_tsquery</function>(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">query</> <type>text</type>)</literal></entry> | ||||||
|         <entry><type>tsquery</type></entry> |         <entry><type>tsquery</type></entry> | ||||||
|         <entry>normalize words and convert to <type>tsquery</></entry> |         <entry>normalize words and convert to <type>tsquery</></entry> | ||||||
|         <entry><literal>to_tsquery('english', 'The & Fat & Rats')</literal></entry> |         <entry><literal>to_tsquery('english', 'The & Fat & Rats')</literal></entry> | ||||||
|         <entry><literal>'fat' & 'rat'</literal></entry> |         <entry><literal>'fat' & 'rat'</literal></entry> | ||||||
|        </row> |        </row> | ||||||
|        <row> |        <row> | ||||||
|         <entry><literal><function>plainto_tsquery</function>(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">query</> <type>text</type>)</literal></entry> |         <entry><literal><function>plainto_tsquery</function>(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">query</> <type>text</type>)</literal></entry> | ||||||
|         <entry><type>tsquery</type></entry> |         <entry><type>tsquery</type></entry> | ||||||
|         <entry>produce <type>tsquery</> ignoring punctuation</entry> |         <entry>produce <type>tsquery</> ignoring punctuation</entry> | ||||||
|         <entry><literal>plainto_tsquery('english', 'The Fat Rats')</literal></entry> |         <entry><literal>plainto_tsquery('english', 'The Fat Rats')</literal></entry> | ||||||
|         <entry><literal>'fat' & 'rat'</literal></entry> |         <entry><literal>'fat' & 'rat'</literal></entry> | ||||||
|        </row> |        </row> | ||||||
|        <row> |        <row> | ||||||
|         <entry><literal><function>numnode</function>(<type>tsquery</>)</literal></entry> |         <entry><literal><function>numnode</function>(<type>tsquery</>)</literal></entry> | ||||||
| @ -7773,7 +7773,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple | |||||||
|         <entry><literal><function>querytree</function>(<replaceable class="PARAMETER">query</replaceable> <type>tsquery</>)</literal></entry> |         <entry><literal><function>querytree</function>(<replaceable class="PARAMETER">query</replaceable> <type>tsquery</>)</literal></entry> | ||||||
|         <entry><type>text</type></entry> |         <entry><type>text</type></entry> | ||||||
|         <entry>get indexable part of a <type>tsquery</></entry> |         <entry>get indexable part of a <type>tsquery</></entry> | ||||||
|         <entry><literal>querytree('foo & ! bar'::tsquery)</literal></entry> |         <entry><literal>querytree('foo & ! bar'::tsquery)</literal></entry> | ||||||
|         <entry><literal>'foo'</literal></entry> |         <entry><literal>'foo'</literal></entry> | ||||||
|        </row> |        </row> | ||||||
|        <row> |        <row> | ||||||
|  | |||||||
| @ -41,30 +41,30 @@ INSERT INTO s VALUES ('jack'); | |||||||
| 
 | 
 | ||||||
| SELECT * FROM s WHERE soundex(nm) = soundex('john'); | SELECT * FROM s WHERE soundex(nm) = soundex('john'); | ||||||
| 
 | 
 | ||||||
| SELECT a.nm, b.nm FROM s a, s b WHERE soundex(a.nm) = soundex(b.nm) AND a.oid <> b.oid; | SELECT a.nm, b.nm FROM s a, s b WHERE soundex(a.nm) = soundex(b.nm) AND a.oid <> b.oid; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_eq(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_eq(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) = soundex($2)' | 'select soundex($1) = soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_lt(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_lt(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) < soundex($2)' | 'select soundex($1) < soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_gt(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_gt(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) > soundex($2)' | 'select soundex($1) > soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_le(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_le(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) <= soundex($2)' | 'select soundex($1) <= soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_ge(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_ge(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) >= soundex($2)' | 'select soundex($1) >= soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| CREATE FUNCTION text_sx_ne(text, text) RETURNS boolean AS | CREATE FUNCTION text_sx_ne(text, text) RETURNS boolean AS | ||||||
| 'select soundex($1) <> soundex($2)' | 'select soundex($1) <> soundex($2)' | ||||||
| LANGUAGE SQL; | LANGUAGE SQL; | ||||||
| 
 | 
 | ||||||
| DROP OPERATOR #= (text, text); | DROP OPERATOR #= (text, text); | ||||||
| @ -75,7 +75,7 @@ SELECT * FROM s WHERE text_sx_eq(nm, 'john'); | |||||||
| 
 | 
 | ||||||
| SELECT * FROM s WHERE s.nm #= 'john'; | SELECT * FROM s WHERE s.nm #= 'john'; | ||||||
| 
 | 
 | ||||||
| SELECT * FROM s WHERE difference(s.nm, 'john') > 2; | SELECT * FROM s WHERE difference(s.nm, 'john') > 2; | ||||||
|   </programlisting> |   </programlisting> | ||||||
|  </sect2> |  </sect2> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -131,15 +131,15 @@ test=# select intset(1); | |||||||
|     </thead> |     </thead> | ||||||
|     <tbody> |     <tbody> | ||||||
|      <row> |      <row> | ||||||
|       <entry><literal>int[] && int[]</literal></entry> |       <entry><literal>int[] && int[]</literal></entry> | ||||||
|       <entry>overlap - returns TRUE if arrays have at least one common element</entry> |       <entry>overlap - returns TRUE if arrays have at least one common element</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry><literal>int[] @> int[]</literal></entry> |       <entry><literal>int[] @> int[]</literal></entry> | ||||||
|       <entry>contains - returns TRUE if left array contains right array</entry> |       <entry>contains - returns TRUE if left array contains right array</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry><literal>int[] <@ int[]</literal></entry> |       <entry><literal>int[] <@ int[]</literal></entry> | ||||||
|       <entry>contained - returns TRUE if left array is contained in right array</entry> |       <entry>contained - returns TRUE if left array is contained in right array</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
| @ -172,7 +172,7 @@ test=# select intset(1); | |||||||
|      </row> |      </row> | ||||||
| 
 | 
 | ||||||
|      <row> |      <row> | ||||||
|       <entry><literal>int[] & int[]</literal></entry> |       <entry><literal>int[] & int[]</literal></entry> | ||||||
|       <entry>returns intersection of arrays</entry> |       <entry>returns intersection of arrays</entry> | ||||||
|      </row> |      </row> | ||||||
| 
 | 
 | ||||||
| @ -192,7 +192,7 @@ test=# select intset(1); | |||||||
|    </tgroup> |    </tgroup> | ||||||
|   </table> |   </table> | ||||||
|   <para> |   <para> | ||||||
|    (Before PostgreSQL 8.2, the containment operators @> and <@ were |    (Before PostgreSQL 8.2, the containment operators @> and <@ were | ||||||
|    respectively called @ and ~.  These names are still available, but are |    respectively called @ and ~.  These names are still available, but are | ||||||
|    deprecated and will eventually be retired.  Notice that the old names |    deprecated and will eventually be retired.  Notice that the old names | ||||||
|    are reversed from the convention formerly followed by the core geometric |    are reversed from the convention formerly followed by the core geometric | ||||||
| @ -213,12 +213,12 @@ CREATE unique index message_section_map_key2 ON message_section_map (sid, mid ); | |||||||
| CREATE INDEX message_rdtree_idx ON message USING GIST ( sections gist__int_ops); | CREATE INDEX message_rdtree_idx ON message USING GIST ( sections gist__int_ops); | ||||||
| 
 | 
 | ||||||
| -- select some messages with section in 1 OR 2 - OVERLAP operator | -- select some messages with section in 1 OR 2 - OVERLAP operator | ||||||
| SELECT message.mid FROM message WHERE message.sections && '{1,2}';  | SELECT message.mid FROM message WHERE message.sections && '{1,2}';  | ||||||
| 
 | 
 | ||||||
| -- select messages contains in sections 1 AND 2 - CONTAINS operator | -- select messages contains in sections 1 AND 2 - CONTAINS operator | ||||||
| SELECT message.mid FROM message WHERE message.sections @> '{1,2}'; | SELECT message.mid FROM message WHERE message.sections @> '{1,2}'; | ||||||
| -- the same, CONTAINED operator | -- the same, CONTAINED operator | ||||||
| SELECT message.mid FROM message WHERE '{1,2}' <@ message.sections; | SELECT message.mid FROM message WHERE '{1,2}' <@ message.sections; | ||||||
|   </programlisting> |   </programlisting> | ||||||
|  </sect2> |  </sect2> | ||||||
| 
 | 
 | ||||||
| @ -230,7 +230,7 @@ SELECT message.mid FROM message WHERE '{1,2}' <@ message.sections; | |||||||
|   <programlisting> |   <programlisting> | ||||||
|   cd ./bench |   cd ./bench | ||||||
|   1. createdb TEST |   1. createdb TEST | ||||||
|   2. psql TEST < ../_int.sql |   2. psql TEST < ../_int.sql | ||||||
|   3. ./create_test.pl | psql TEST |   3. ./create_test.pl | psql TEST | ||||||
|   4. ./bench.pl - perl script to benchmark queries, supports OR, AND queries |   4. ./bench.pl - perl script to benchmark queries, supports OR, AND queries | ||||||
|                   with/without RD-Tree. Run script without arguments to |                   with/without RD-Tree. Run script without arguments to | ||||||
|  | |||||||
| @ -244,52 +244,52 @@ | |||||||
|   <itemizedlist> |   <itemizedlist> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISBN13 -> EAN13 |      ISBN13 -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISMN13 -> EAN13 |      ISMN13 -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISSN13 -> EAN13 |      ISSN13 -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISBN -> EAN13 |      ISBN -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISMN -> EAN13 |      ISMN -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISSN -> EAN13 |      ISSN -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      UPC  -> EAN13 |      UPC  -> EAN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISBN <-> ISBN13 |      ISBN <-> ISBN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISMN <-> ISMN13 |      ISMN <-> ISMN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      ISSN <-> ISSN13 |      ISSN <-> ISSN13 | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|   </itemizedlist> |   </itemizedlist> | ||||||
|  | |||||||
| @ -102,7 +102,7 @@ | |||||||
|   </itemizedlist> |   </itemizedlist> | ||||||
| 
 | 
 | ||||||
|   <para> |   <para> | ||||||
|    As the ODBC driver needs a permanent lo type (& JDBC could be optimised to |    As the ODBC driver needs a permanent lo type (& JDBC could be optimised to | ||||||
|    use it if it's Oid is fixed), and as the above issues can only be fixed by |    use it if it's Oid is fixed), and as the above issues can only be fixed by | ||||||
|    some internal changes, I feel it should become a permanent built-in type. |    some internal changes, I feel it should become a permanent built-in type. | ||||||
|   </para> |   </para> | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ | |||||||
|  <sect2> |  <sect2> | ||||||
|   <title>Definitions</title> |   <title>Definitions</title> | ||||||
|   <para> |   <para> | ||||||
|    A <emphasis>label</emphasis> of a node is a sequence of one or more words  |    A <firstterm>label</firstterm> of a node is a sequence of one or more words  | ||||||
|    separated by blank character '_' and containing letters and digits ( for  |    separated by blank character '_' and containing letters and digits ( for  | ||||||
|    example, [a-zA-Z0-9] for C locale). The length of a label is limited by 256  |    example, [a-zA-Z0-9] for C locale). The length of a label is limited by 256  | ||||||
|    bytes. |    bytes. | ||||||
| @ -24,9 +24,9 @@ | |||||||
|    Example: 'Countries', 'Personal_Services' |    Example: 'Countries', 'Personal_Services' | ||||||
|   </para> |   </para> | ||||||
|   <para> |   <para> | ||||||
|    A <emphasis>label path</emphasis> of a node is a sequence of one or more  |    A <firstterm>label path</firstterm> of a node is a sequence of one or more  | ||||||
|    dot-separated labels l1.l2...ln, represents path from root to the node. The  |    dot-separated labels l1.l2...ln, represents path from root to the node. The  | ||||||
|    length of a label path is limited by 65Kb, but size <= 2Kb is preferrable.  |    length of a label path is limited by 65Kb, but size <= 2Kb is preferrable.  | ||||||
|    We consider it's not a strict limitation (maximal size of label path for  |    We consider it's not a strict limitation (maximal size of label path for  | ||||||
|    DMOZ catalogue - <ulink url="http://www.dmoz.org"></ulink>, is about 240  |    DMOZ catalogue - <ulink url="http://www.dmoz.org"></ulink>, is about 240  | ||||||
|    bytes!) |    bytes!) | ||||||
| @ -85,7 +85,7 @@ | |||||||
|      </listitem> |      </listitem> | ||||||
|      <listitem> |      <listitem> | ||||||
|       <para>%     Don't account word separator '_' in label matching, that is  |       <para>%     Don't account word separator '_' in label matching, that is  | ||||||
|                      'Russian%' would match 'Russian_nations', but not 'Russian' |                   'Russian%' would match 'Russian_nations', but not 'Russian' | ||||||
|       </para> |       </para> | ||||||
|      </listitem> |      </listitem> | ||||||
|     </itemizedlist> |     </itemizedlist> | ||||||
| @ -143,7 +143,7 @@ | |||||||
|     the end of word. The meaning of modifiers are the same as for lquery. |     the end of word. The meaning of modifiers are the same as for lquery. | ||||||
|     </para> |     </para> | ||||||
|     <para> |     <para> | ||||||
|      Example: <literal>'Europe & Russia*@ & !Transportation'</literal> |      Example: <literal>'Europe & Russia*@ & !Transportation'</literal> | ||||||
|     </para> |     </para> | ||||||
|     <para> |     <para> | ||||||
|      Search paths contain words 'Europe' and 'Russia*' (case-insensitive) and |      Search paths contain words 'Europe' and 'Russia*' (case-insensitive) and | ||||||
| @ -164,21 +164,21 @@ | |||||||
|   <itemizedlist> |   <itemizedlist> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal><,>,<=,>=,=, <></literal> |      <literal><,>,<=,>=,=, <></literal> | ||||||
|      - Have their usual meanings. Comparison is doing in the order of direct |      - Have their usual meanings. Comparison is doing in the order of direct | ||||||
|      tree traversing, children of a node are sorted lexicographic. |      tree traversing, children of a node are sorted lexicographic. | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal>ltree @> ltree</literal> |      <literal>ltree @> ltree</literal> | ||||||
|       - returns TRUE if left argument is an ancestor of right argument (or |       - returns TRUE if left argument is an ancestor of right argument (or | ||||||
|       equal). |       equal). | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal>ltree <@ ltree </literal> |      <literal>ltree <@ ltree </literal> | ||||||
|      - returns TRUE if left argument is a descendant of right argument (or |      - returns TRUE if left argument is a descendant of right argument (or | ||||||
|      equal). |      equal). | ||||||
|     </para> |     </para> | ||||||
| @ -216,13 +216,13 @@ | |||||||
|   <itemizedlist> |   <itemizedlist> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal>ltree[] @> ltree, ltree <@ ltree[]</literal> |      <literal>ltree[] @> ltree, ltree <@ ltree[]</literal> | ||||||
|      - returns TRUE if array ltree[] contains an ancestor of ltree. |      - returns TRUE if array ltree[] contains an ancestor of ltree. | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal>ltree @> ltree[], ltree[] <@ ltree</literal> |      <literal>ltree @> ltree[], ltree[] <@ ltree</literal> | ||||||
|      - returns TRUE if array ltree[] contains a descendant of ltree. |      - returns TRUE if array ltree[] contains a descendant of ltree. | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
| @ -248,7 +248,7 @@ | |||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para> |     <para> | ||||||
|      <literal>ltree[] ?@> ltree, ltree ?<@ ltree[], ltree[] ?~ lquery, ltree[] ?@ ltxtquery</literal> |      <literal>ltree[] ?@> ltree, ltree ?<@ ltree[], ltree[] ?~ lquery, ltree[] ?@ ltxtquery</literal> | ||||||
| 
 | 
 | ||||||
|      - returns first element of array ltree[] satisfies corresponding condition |      - returns first element of array ltree[] satisfies corresponding condition | ||||||
|      and NULL in vice versa. |      and NULL in vice versa. | ||||||
| @ -292,7 +292,7 @@ | |||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <para>GiST index over ltree[]: |     <para>GiST index over ltree[]: | ||||||
|      <literal>ltree[]<@ ltree, ltree @> ltree[], @, ~, ?.</literal> |      <literal>ltree[]<@ ltree, ltree @> ltree[], @, ~, ?.</literal> | ||||||
|     </para> |     </para> | ||||||
|     <para> |     <para> | ||||||
|      Example: |      Example: | ||||||
| @ -418,8 +418,8 @@ | |||||||
|   <title>Example</title> |   <title>Example</title> | ||||||
|   <programlisting> |   <programlisting> | ||||||
|  createdb ltreetest |  createdb ltreetest | ||||||
|  psql ltreetest < /usr/local/pgsql/share/contrib/ltree.sql |  psql ltreetest < /usr/local/pgsql/share/contrib/ltree.sql | ||||||
|  psql ltreetest < ltreetest.sql |  psql ltreetest < ltreetest.sql | ||||||
|   </programlisting> |   </programlisting> | ||||||
| 
 | 
 | ||||||
|   <para> |   <para> | ||||||
| @ -445,7 +445,7 @@ shown below: | |||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| ltreetest=# select path from test where path <@ 'Top.Science'; | ltreetest=# select path from test where path <@ 'Top.Science'; | ||||||
|                 path                 |                 path                 | ||||||
| ------------------------------------ | ------------------------------------ | ||||||
|  Top.Science |  Top.Science | ||||||
| @ -481,7 +481,7 @@ ltreetest=# select path from test where path ~ '*.!pictures@.*.Astronomy.*'; | |||||||
|    Full text search: |    Full text search: | ||||||
|   </para> |   </para> | ||||||
|   <programlisting> |   <programlisting> | ||||||
| ltreetest=# select path from test where path @ 'Astro*% & !pictures@'; | ltreetest=# select path from test where path @ 'Astro*% & !pictures@'; | ||||||
|                 path                 |                 path                 | ||||||
| ------------------------------------ | ------------------------------------ | ||||||
|  Top.Science.Astronomy |  Top.Science.Astronomy | ||||||
| @ -490,7 +490,7 @@ ltreetest=# select path from test where path @ 'Astro*% & !pictures@'; | |||||||
|  Top.Hobbies.Amateurs_Astronomy |  Top.Hobbies.Amateurs_Astronomy | ||||||
| (4 rows) | (4 rows) | ||||||
| 
 | 
 | ||||||
| ltreetest=# select path from test where path @ 'Astro* & !pictures@'; | ltreetest=# select path from test where path @ 'Astro* & !pictures@'; | ||||||
|                 path                 |                 path                 | ||||||
| ------------------------------------ | ------------------------------------ | ||||||
|  Top.Science.Astronomy |  Top.Science.Astronomy | ||||||
| @ -502,7 +502,7 @@ ltreetest=# select path from test where path @ 'Astro* & !pictures@'; | |||||||
|    Using Functions: |    Using Functions: | ||||||
|   </para> |   </para> | ||||||
|   <programlisting> |   <programlisting> | ||||||
| ltreetest=# select subpath(path,0,2)||'Space'||subpath(path,2) from test where path <@ 'Top.Science.Astronomy'; | ltreetest=# select subpath(path,0,2)||'Space'||subpath(path,2) from test where path <@ 'Top.Science.Astronomy'; | ||||||
|                  ?column?                  |                  ?column?                  | ||||||
| ------------------------------------------ | ------------------------------------------ | ||||||
|  Top.Science.Space.Astronomy |  Top.Science.Space.Astronomy | ||||||
| @ -519,7 +519,7 @@ LANGUAGE SQL IMMUTABLE; | |||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| ltreetest=# select ins_label(path,2,'Space') from test where path <@ 'Top.Science.Astronomy'; | ltreetest=# select ins_label(path,2,'Space') from test where path <@ 'Top.Science.Astronomy'; | ||||||
|                 ins_label                  |                 ins_label                  | ||||||
| ------------------------------------------ | ------------------------------------------ | ||||||
|  Top.Science.Space.Astronomy |  Top.Science.Space.Astronomy | ||||||
| @ -537,7 +537,7 @@ CREATE FUNCTION ins_label(ltree, ltree, text) RETURNS ltree | |||||||
| AS 'select subpath($1,0,nlevel($2)) || $3 || subpath($1,nlevel($2));' | AS 'select subpath($1,0,nlevel($2)) || $3 || subpath($1,nlevel($2));' | ||||||
| LANGUAGE SQL IMMUTABLE; | LANGUAGE SQL IMMUTABLE; | ||||||
| 
 | 
 | ||||||
| ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where path <@ 'Top.Science.Astronomy'; | ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where path <@ 'Top.Science.Astronomy'; | ||||||
|                 ins_label                  |                 ins_label                  | ||||||
| ------------------------------------------ | ------------------------------------------ | ||||||
|  Top.Science.Space.Astronomy |  Top.Science.Space.Astronomy | ||||||
| @ -606,7 +606,7 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where | |||||||
|       Q2: The same as Q1 but with counting of successors |       Q2: The same as Q1 but with counting of successors | ||||||
|      </para> |      </para> | ||||||
|      <programlisting> |      <programlisting> | ||||||
|      select path as parentpath , (select count(*)-1 from dmoz where path <@ |      select path as parentpath , (select count(*)-1 from dmoz where path <@ | ||||||
|      p.path) as count from dmoz p where path ~ 'Top.Adult.Arts.Animation.*{1}'; |      p.path) as count from dmoz p where path ~ 'Top.Adult.Arts.Animation.*{1}'; | ||||||
|                  parentpath             | count  |                  parentpath             | count  | ||||||
|      -----------------------------------+------- |      -----------------------------------+------- | ||||||
| @ -620,7 +620,7 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where | |||||||
|       Q3: Get all parents |       Q3: Get all parents | ||||||
|      </para> |      </para> | ||||||
|      <programlisting> |      <programlisting> | ||||||
|      select path from dmoz where path @> 'Top.Adult.Arts.Animation' order by |      select path from dmoz where path @> 'Top.Adult.Arts.Animation' order by | ||||||
|      path asc; |      path asc; | ||||||
|                 path            |                 path            | ||||||
|      -------------------------- |      -------------------------- | ||||||
| @ -636,8 +636,8 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where | |||||||
|       Q4: Get all parents with counting of children |       Q4: Get all parents with counting of children | ||||||
|      </para> |      </para> | ||||||
|      <programlisting> |      <programlisting> | ||||||
|      select path, (select count(*)-1 from dmoz where path <@ p.path) as count |      select path, (select count(*)-1 from dmoz where path <@ p.path) as count | ||||||
|      from dmoz p where path @> 'Top.Adult.Arts.Animation' order by path asc; |      from dmoz p where path @> 'Top.Adult.Arts.Animation' order by path asc; | ||||||
|                 path           | count   |                 path           | count   | ||||||
|      --------------------------+-------- |      --------------------------+-------- | ||||||
|       Top                      | 300273 |       Top                      | 300273 | ||||||
| @ -753,7 +753,7 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where | |||||||
|   <para> |   <para> | ||||||
|    For ltree we store LPS in a B-tree, implemented using GiST. Each node entry is |    For ltree we store LPS in a B-tree, implemented using GiST. Each node entry is | ||||||
|    represented by (left_bound, signature, right_bound), so that we could speedup |    represented by (left_bound, signature, right_bound), so that we could speedup | ||||||
|    operations <literal><, <=, =, >=, ></literal> using left_bound, right_bound and prune branches of |    operations <literal><, <=, =, >=, ></literal> using left_bound, right_bound and prune branches of | ||||||
|    a tree using signature. |    a tree using signature. | ||||||
|   </para> |   </para> | ||||||
|  </sect2> |  </sect2> | ||||||
| @ -768,4 +768,3 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where | |||||||
|   </para> |   </para> | ||||||
|  </sect2> |  </sect2> | ||||||
| </sect1> | </sect1> | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.121 2007/11/28 21:47:39 momjian Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.122 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
| <chapter id="plpgsql">  | <chapter id="plpgsql">  | ||||||
|   <title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title> |   <title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title> | ||||||
| @ -704,7 +704,7 @@ IF x < y THEN ... | |||||||
| </programlisting> | </programlisting> | ||||||
|      what happens behind the scenes is |      what happens behind the scenes is | ||||||
| <programlisting> | <programlisting> | ||||||
| PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2; | PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2; | ||||||
| </programlisting> | </programlisting> | ||||||
|      and then this prepared statement is <command>EXECUTE</>d for each |      and then this prepared statement is <command>EXECUTE</>d for each | ||||||
|      execution of the <command>IF</> statement, with the current values |      execution of the <command>IF</> statement, with the current values | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/pltcl.sgml,v 2.46 2007/02/21 03:27:31 adunstan Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/pltcl.sgml,v 2.47 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="pltcl"> |  <chapter id="pltcl"> | ||||||
|   <title>PL/Tcl - Tcl Procedural Language</title> |   <title>PL/Tcl - Tcl Procedural Language</title> | ||||||
| @ -164,7 +164,7 @@ CREATE FUNCTION overpaid(employee) RETURNS boolean AS $$ | |||||||
|     if {200000.0 < $1(salary)} { |     if {200000.0 < $1(salary)} { | ||||||
|         return "t" |         return "t" | ||||||
|     } |     } | ||||||
|     if {$1(age) < 30 && 100000.0 < $1(salary)} { |     if {$1(age) < 30 && 100000.0 < $1(salary)} { | ||||||
|         return "t" |         return "t" | ||||||
|     } |     } | ||||||
|     return "f" |     return "f" | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $PostgreSQL: pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.20 2007/01/31 23:26:03 momjian Exp $ | $PostgreSQL: pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.21 2007/12/03 23:49:51 tgl Exp $ | ||||||
| PostgreSQL documentation | PostgreSQL documentation | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
| @ -270,7 +270,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL | |||||||
| <programlisting> | <programlisting> | ||||||
| CREATE OPERATOR CLASS gist__int_ops | CREATE OPERATOR CLASS gist__int_ops | ||||||
|     DEFAULT FOR TYPE _int4 USING gist AS |     DEFAULT FOR TYPE _int4 USING gist AS | ||||||
|         OPERATOR        3       &&, |         OPERATOR        3       &&, | ||||||
|         OPERATOR        6       =       RECHECK, |         OPERATOR        6       =       RECHECK, | ||||||
|         OPERATOR        7       @>, |         OPERATOR        7       @>, | ||||||
|         OPERATOR        8       <@, |         OPERATOR        8       <@, | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.558 2007/12/02 03:47:11 tgl Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.559 2007/12/03 23:49:50 tgl Exp $ --> | ||||||
| <!-- | <!-- | ||||||
| 
 | 
 | ||||||
| Typical markup: | Typical markup: | ||||||
| @ -4833,7 +4833,7 @@ current_date < 2017-11-17 | |||||||
|       </para> |       </para> | ||||||
| 
 | 
 | ||||||
|       <para> |       <para> | ||||||
|        The new operators are <literal>&</> (and), <literal>|</> |        The new operators are <literal>&</> (and), <literal>|</> | ||||||
|        (or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>, |        (or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>, | ||||||
|        <type>inet</> <literal>-</> <type>int8</>, and |        <type>inet</> <literal>-</> <type>int8</>, and | ||||||
|        <type>inet</> <literal>-</> <type>inet</>. |        <type>inet</> <literal>-</> <type>inet</>. | ||||||
| @ -8879,8 +8879,8 @@ psql -t -f fixseq.sql db1 | psql -e db1 | |||||||
| 
 | 
 | ||||||
|      <listitem> |      <listitem> | ||||||
|       <para> |       <para> | ||||||
|        Remove the <literal><<</>, <literal>>></>, |        Remove the <literal><<</>, <literal>>></>, | ||||||
|        <literal>&<</>, and <literal>&></> operators from |        <literal>&<</>, and <literal>&></> operators from | ||||||
|        <filename>/contrib/cube</> |        <filename>/contrib/cube</> | ||||||
|       </para> |       </para> | ||||||
|       <para> |       <para> | ||||||
| @ -10248,7 +10248,7 @@ typedefs (Michael)</para></listitem> | |||||||
|      <listitem> |      <listitem> | ||||||
|       <para> |       <para> | ||||||
|        This is the first <productname>PostgreSQL</productname> release |        This is the first <productname>PostgreSQL</productname> release | ||||||
|        to run natively on <trademark class=registered>Microsoft Windows</> as |        to run natively on <trademark class="registered">Microsoft Windows</> as | ||||||
|        a server. It can run as a <productname>Windows</> service. This |        a server. It can run as a <productname>Windows</> service. This | ||||||
|        release supports NT-based Windows releases like |        release supports NT-based Windows releases like | ||||||
|        <productname>Windows 2000 SP4</>, <productname>Windows XP</>, and |        <productname>Windows 2000 SP4</>, <productname>Windows XP</>, and | ||||||
| @ -19187,7 +19187,7 @@ Copy pg_ident.conf.sample into /lib directory in install (Bruce) | |||||||
| Add SJIS UDC (NEC selection IBM kanji) support (Eiji Tokuya) | Add SJIS UDC (NEC selection IBM kanji) support (Eiji Tokuya) | ||||||
| Fix too long syslog message (Tatsuo) | Fix too long syslog message (Tatsuo) | ||||||
| Fix problem with quoted indexes that are too long (Tom) | Fix problem with quoted indexes that are too long (Tom) | ||||||
| JDBC ResultSet.getTimestamp() fix (Gregory Krasnow & Floyd Marinescu) | JDBC ResultSet.getTimestamp() fix (Gregory Krasnow & Floyd Marinescu) | ||||||
| ecpg changes (Michael) | ecpg changes (Michael) | ||||||
|     </programlisting> |     </programlisting> | ||||||
|    </para> |    </para> | ||||||
| @ -21039,7 +21039,7 @@ Source Tree Changes | |||||||
| Add new html development tools, and flow chart in /tools/backend | Add new html development tools, and flow chart in /tools/backend | ||||||
| Fix for SCO compiles | Fix for SCO compiles | ||||||
| Stratus computer port Robert Gillies | Stratus computer port Robert Gillies | ||||||
| Added support for shlib for BSD44_derived & i386_solaris | Added support for shlib for BSD44_derived & i386_solaris | ||||||
| Make configure more automated(Brook) | Make configure more automated(Brook) | ||||||
| Add script to check regression test results | Add script to check regression test results | ||||||
| Break parser functions into smaller files, group together(Bruce) | Break parser functions into smaller files, group together(Bruce) | ||||||
| @ -21225,7 +21225,7 @@ Enhancements | |||||||
| ------------ | ------------ | ||||||
| Default genetic optimizer GEQO parameter is now 8(Bruce) | Default genetic optimizer GEQO parameter is now 8(Bruce) | ||||||
| Allow use parameters in target list having aggregates in functions(Vadim) | Allow use parameters in target list having aggregates in functions(Vadim) | ||||||
| Added JDBC driver as an interface(Adrian & Peter) | Added JDBC driver as an interface(Adrian & Peter) | ||||||
| pg_password utility | pg_password utility | ||||||
| Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim) | Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim) | ||||||
| Triggers implemented with CREATE TRIGGER (SQL3)(Vadim) | Triggers implemented with CREATE TRIGGER (SQL3)(Vadim) | ||||||
| @ -21236,7 +21236,7 @@ Include reserved words for string handling, outer joins, and unions(Thomas) | |||||||
| Implement extended comments ("/* ... */") using exclusive states(Thomas) | Implement extended comments ("/* ... */") using exclusive states(Thomas) | ||||||
| Add "//" single-line comments(Bruce) | Add "//" single-line comments(Bruce) | ||||||
| Remove some restrictions on characters in operator names(Thomas) | Remove some restrictions on characters in operator names(Thomas) | ||||||
| DEFAULT and CONSTRAINT for tables implemented (SQL92)(Vadim & Thomas) | DEFAULT and CONSTRAINT for tables implemented (SQL92)(Vadim & Thomas) | ||||||
| Add text concatenation operator and function (SQL92)(Thomas) | Add text concatenation operator and function (SQL92)(Thomas) | ||||||
| Support WITH TIME ZONE syntax (SQL92)(Thomas) | Support WITH TIME ZONE syntax (SQL92)(Thomas) | ||||||
| Support INTERVAL unit TO unit syntax (SQL92)(Thomas) | Support INTERVAL unit TO unit syntax (SQL92)(Thomas) | ||||||
| @ -21258,7 +21258,7 @@ Replace distance operator "<===>" with "<->"(Thomas) | |||||||
| Replace "above" operator "!^" with ">^" and "below" operator "!|" with "<^"(Thomas) | Replace "above" operator "!^" with ">^" and "below" operator "!|" with "<^"(Thomas) | ||||||
| Add routines for text trimming on both ends, substring, and string position(Thomas) | Add routines for text trimming on both ends, substring, and string position(Thomas) | ||||||
| Added conversion routines circle(box) and poly(circle)(Thomas) | Added conversion routines circle(box) and poly(circle)(Thomas) | ||||||
| Allow internal sorts to be stored in memory rather than in files(Bruce & Vadim) | Allow internal sorts to be stored in memory rather than in files(Bruce & Vadim) | ||||||
| Allow functions and operators on internally-identical types to succeed(Bruce) | Allow functions and operators on internally-identical types to succeed(Bruce) | ||||||
| Speed up backend start-up after profiling analysis(Bruce) | Speed up backend start-up after profiling analysis(Bruce) | ||||||
| Inline frequently called functions for performance(Bruce) | Inline frequently called functions for performance(Bruce) | ||||||
| @ -21291,7 +21291,7 @@ new interfaces directory(Marc) | |||||||
| Replace fopen() calls with calls to fd.c functions(Bruce) | Replace fopen() calls with calls to fd.c functions(Bruce) | ||||||
| Make functions static where possible(Bruce) | Make functions static where possible(Bruce) | ||||||
| enclose unused functions in #ifdef NOT_USED(Bruce) | enclose unused functions in #ifdef NOT_USED(Bruce) | ||||||
| Remove call to difftime() in timestamp support to fix SunOS(Bruce & Thomas) | Remove call to difftime() in timestamp support to fix SunOS(Bruce & Thomas) | ||||||
| Changes for Digital Unix | Changes for Digital Unix | ||||||
| Portability fix for pg_dumpall(Bruce) | Portability fix for pg_dumpall(Bruce) | ||||||
| Rename pg_attribute.attnvals to attdispersion(Bruce) | Rename pg_attribute.attnvals to attdispersion(Bruce) | ||||||
| @ -21299,12 +21299,12 @@ Rename pg_attribute.attnvals to attdispersion(Bruce) | |||||||
| "built-in" manual page now "pgbuiltin"(Bruce) | "built-in" manual page now "pgbuiltin"(Bruce) | ||||||
| "drop" manual page now "drop_table"(Bruce) | "drop" manual page now "drop_table"(Bruce) | ||||||
| Add "create_trigger", "drop_trigger" manual pages(Thomas) | Add "create_trigger", "drop_trigger" manual pages(Thomas) | ||||||
| Add constraints regression test(Vadim & Thomas) | Add constraints regression test(Vadim & Thomas) | ||||||
| Add comments syntax regression test(Thomas) | Add comments syntax regression test(Thomas) | ||||||
| Add PGINDENT and support program(Bruce) | Add PGINDENT and support program(Bruce) | ||||||
| Massive commit to run PGINDENT on all *.c and *.h files(Bruce) | Massive commit to run PGINDENT on all *.c and *.h files(Bruce) | ||||||
| Files moved to /src/tools directory(Bruce) | Files moved to /src/tools directory(Bruce) | ||||||
| SPI and Trigger programming guides (Vadim & D'Arcy) | SPI and Trigger programming guides (Vadim & D'Arcy) | ||||||
| </programlisting> | </programlisting> | ||||||
| </para> | </para> | ||||||
| </sect2> | </sect2> | ||||||
| @ -21611,7 +21611,7 @@ Allow libpq to distinguish between text value '' and null(Bruce) | |||||||
| Allow non-postgres users with createdb privs to destroydb's | Allow non-postgres users with createdb privs to destroydb's | ||||||
| Allow restriction on who can create C functions(Bryan) | Allow restriction on who can create C functions(Bryan) | ||||||
| Allow restriction on who can do backend COPY(Bryan) | Allow restriction on who can do backend COPY(Bryan) | ||||||
| Can shrink tables, pg_time and pg_log(Vadim & Erich) | Can shrink tables, pg_time and pg_log(Vadim & Erich) | ||||||
| Change debug level 2 to print queries only, changed debug heading layout(Bruce) | Change debug level 2 to print queries only, changed debug heading layout(Bruce) | ||||||
| Change default decimal constant representation from float4 to float8(Bruce) | Change default decimal constant representation from float4 to float8(Bruce) | ||||||
| European date format now set when postmaster is started | European date format now set when postmaster is started | ||||||
|  | |||||||
| @ -72,7 +72,7 @@ test=> select '6.25 .. 6.50'::seg as "pH"; | |||||||
|   <para> |   <para> | ||||||
|    The external representation of an interval is formed using one or two |    The external representation of an interval is formed using one or two | ||||||
|    floating point numbers joined by the range operator ('..' or '...').  |    floating point numbers joined by the range operator ('..' or '...').  | ||||||
|    Optional certainty indicators (<, > and ~) are ignored by the internal  |    Optional certainty indicators (<, > and ~) are ignored by the internal  | ||||||
|    logics, but are retained in the data. |    logics, but are retained in the data. | ||||||
|   </para> |   </para> | ||||||
|    |    | ||||||
| @ -82,35 +82,35 @@ test=> select '6.25 .. 6.50'::seg as "pH"; | |||||||
|     <tbody> |     <tbody> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 1</entry> |       <entry>rule 1</entry> | ||||||
|       <entry>seg -> boundary PLUMIN deviation</entry> |       <entry>seg -> boundary PLUMIN deviation</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 2</entry> |       <entry>rule 2</entry> | ||||||
|       <entry>seg -> boundary RANGE boundary</entry> |       <entry>seg -> boundary RANGE boundary</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 3</entry> |       <entry>rule 3</entry> | ||||||
|       <entry>seg -> boundary RANGE</entry> |       <entry>seg -> boundary RANGE</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 4</entry> |       <entry>rule 4</entry> | ||||||
|       <entry>seg -> RANGE boundary</entry> |       <entry>seg -> RANGE boundary</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 5</entry> |       <entry>rule 5</entry> | ||||||
|       <entry>seg -> boundary</entry> |       <entry>seg -> boundary</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 6</entry> |       <entry>rule 6</entry> | ||||||
|       <entry>boundary -> FLOAT</entry> |       <entry>boundary -> FLOAT</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 7</entry> |       <entry>rule 7</entry> | ||||||
|       <entry>boundary -> EXTENSION FLOAT</entry> |       <entry>boundary -> EXTENSION FLOAT</entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>rule 8</entry> |       <entry>rule 8</entry> | ||||||
|       <entry>deviation -> FLOAT</entry> |       <entry>deviation -> FLOAT</entry> | ||||||
|      </row> |      </row> | ||||||
|     </tbody> |     </tbody> | ||||||
|    </tgroup> |    </tgroup> | ||||||
| @ -142,7 +142,7 @@ test=> select '6.25 .. 6.50'::seg as "pH"; | |||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>EXTENSION</entry> |       <entry>EXTENSION</entry> | ||||||
|       <entry>[<>~]</entry> |       <entry>[<>~]</entry> | ||||||
|      </row> |      </row> | ||||||
|     </tbody> |     </tbody> | ||||||
|    </tgroup> |    </tgroup> | ||||||
| @ -169,16 +169,16 @@ test=> select '6.25 .. 6.50'::seg as "pH"; | |||||||
|       </entry> |       </entry> | ||||||
|      </row>  |      </row>  | ||||||
|      <row> |      <row> | ||||||
|       <entry><5.0</entry> |       <entry><5.0</entry> | ||||||
|       <entry> |       <entry> | ||||||
|        (rules 5,7) -- creates a point at 5.0; '<' is ignored but  |        (rules 5,7) -- creates a point at 5.0; '<' is ignored but  | ||||||
|        is preserved as a comment |        is preserved as a comment | ||||||
|       </entry> |       </entry> | ||||||
|      </row> |      </row> | ||||||
|      <row> |      <row> | ||||||
|       <entry>>5.0</entry> |       <entry>>5.0</entry> | ||||||
|       <entry> |       <entry> | ||||||
|        (rules 5,7) -- creates a point at 5.0; '>' is ignored but |        (rules 5,7) -- creates a point at 5.0; '>' is ignored but | ||||||
|        is preserved as a comment |        is preserved as a comment | ||||||
|       </entry> |       </entry> | ||||||
|      </row> |      </row> | ||||||
| @ -305,39 +305,39 @@ postgres=> select '10(+-)1'::seg as seg; | |||||||
|   <itemizedlist> |   <itemizedlist> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] << [c, d]        Is left of | [a, b] << [c, d]        Is left of | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|      The left operand, [a, b], occurs entirely to the left of the |      The left operand, [a, b], occurs entirely to the left of the | ||||||
|      right operand, [c, d], on the axis (-inf, inf). It means, |      right operand, [c, d], on the axis (-inf, inf). It means, | ||||||
|      [a, b] << [c, d] is true if b < c and false otherwise |      [a, b] << [c, d] is true if b < c and false otherwise | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] >> [c, d]        Is right of | [a, b] >> [c, d]        Is right of | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         [a, b] is occurs entirely to the right of [c, d].  |         [a, b] is occurs entirely to the right of [c, d].  | ||||||
|         [a, b] >> [c, d] is true if a > d and false otherwise |         [a, b] >> [c, d] is true if a > d and false otherwise | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] &< [c, d]        Overlaps or is left of | [a, b] &< [c, d]        Overlaps or is left of | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         This might be better read as "does not extend to right of". |         This might be better read as "does not extend to right of". | ||||||
|         It is true when b <= d. |         It is true when b <= d. | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] &> [c, d]        Overlaps or is right of | [a, b] &> [c, d]        Overlaps or is right of | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         This might be better read as "does not extend to left of". |         This might be better read as "does not extend to left of". | ||||||
|         It is true when a >= c. |         It is true when a >= c. | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
| @ -351,7 +351,7 @@ postgres=> select '10(+-)1'::seg as seg; | |||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] && [c, d]        Overlaps | [a, b] && [c, d]        Overlaps | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         The segments [a, b] and [c, d] overlap. |         The segments [a, b] and [c, d] overlap. | ||||||
| @ -359,25 +359,25 @@ postgres=> select '10(+-)1'::seg as seg; | |||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] @> [c, d]                Contains | [a, b] @> [c, d]                Contains | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         The segment [a, b] contains the segment [c, d], that is,  |         The segment [a, b] contains the segment [c, d], that is,  | ||||||
|         a <= c and b >= d |         a <= c and b >= d | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|    <listitem> |    <listitem> | ||||||
|     <programlisting> |     <programlisting> | ||||||
| [a, b] <@ [c, d]                Contained in | [a, b] <@ [c, d]                Contained in | ||||||
|     </programlisting> |     </programlisting> | ||||||
|     <para> |     <para> | ||||||
|         The segment [a, b] is contained in [c, d], that is,  |         The segment [a, b] is contained in [c, d], that is,  | ||||||
|         a >= c and b <= d |         a >= c and b <= d | ||||||
|     </para> |     </para> | ||||||
|    </listitem> |    </listitem> | ||||||
|   </itemizedlist> |   </itemizedlist> | ||||||
|   <para> |   <para> | ||||||
|    (Before PostgreSQL 8.2, the containment operators @> and <@ were |    (Before PostgreSQL 8.2, the containment operators @> and <@ were | ||||||
|    respectively called @ and ~.  These names are still available, but are |    respectively called @ and ~.  These names are still available, but are | ||||||
|    deprecated and will eventually be retired.  Notice that the old names |    deprecated and will eventually be retired.  Notice that the old names | ||||||
|    are reversed from the convention formerly followed by the core geometric |    are reversed from the convention formerly followed by the core geometric | ||||||
| @ -393,8 +393,8 @@ postgres=> select '10(+-)1'::seg as seg; | |||||||
|   </para> |   </para> | ||||||
| 
 | 
 | ||||||
|   <programlisting> |   <programlisting> | ||||||
| [a, b] < [c, d]                Less than | [a, b] < [c, d]                Less than | ||||||
| [a, b] > [c, d]                Greater than | [a, b] > [c, d]                Greater than | ||||||
|   </programlisting> |   </programlisting> | ||||||
|   <para> |   <para> | ||||||
|    These operators do not make a lot of sense for any practical |    These operators do not make a lot of sense for any practical | ||||||
|  | |||||||
| @ -173,7 +173,7 @@ CREATE TYPE tablefunc_crosstab_N AS ( | |||||||
|      e.g. the provided crosstab2 function produces a set something like: |      e.g. the provided crosstab2 function produces a set something like: | ||||||
|     </para> |     </para> | ||||||
|     <programlisting> |     <programlisting> | ||||||
|                       <== values  columns ==> |                       <== values  columns ==> | ||||||
|            row_name   category_1   category_2 |            row_name   category_1   category_2 | ||||||
|            ---------+------------+------------ |            ---------+------------+------------ | ||||||
|              row1        val1         val2 |              row1        val1         val2 | ||||||
| @ -286,7 +286,7 @@ crosstab(text sql, int N) | |||||||
|     the example crosstab function produces a set something like: |     the example crosstab function produces a set something like: | ||||||
|    </para> |    </para> | ||||||
|    <programlisting> |    <programlisting> | ||||||
|             <== values  columns ==> |             <== values  columns ==> | ||||||
| row_name   category_1   category_2 | row_name   category_1   category_2 | ||||||
|  ---------+------------+------------ |  ---------+------------+------------ | ||||||
|    row1        val1         val2 |    row1        val1         val2 | ||||||
| @ -479,7 +479,7 @@ SELECT DISTINCT cat FROM foo; | |||||||
|     the example crosstab function produces a set something like: |     the example crosstab function produces a set something like: | ||||||
|    </para> |    </para> | ||||||
|    <programlisting> |    <programlisting> | ||||||
|                       <== values  columns ==> |                       <== values  columns ==> | ||||||
|            row_name   extra   cat1   cat2   cat3   cat4 |            row_name   extra   cat1   cat2   cat3   cat4 | ||||||
|            ---------+-------+------+------+------+------ |            ---------+-------+------+------+------+------ | ||||||
|              row1     extra1  val1   val2          val4 |              row1     extra1  val1   val2          val4 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| <!-- $PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.50 2007/02/14 01:58:56 tgl Exp $ --> | <!-- $PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.51 2007/12/03 23:49:51 tgl Exp $ --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="triggers"> |  <chapter id="triggers"> | ||||||
|   <title>Triggers</title> |   <title>Triggers</title> | ||||||
| @ -288,7 +288,7 @@ CALLED_AS_TRIGGER(fcinfo) | |||||||
| </programlisting> | </programlisting> | ||||||
|     which expands to: |     which expands to: | ||||||
| <programlisting> | <programlisting> | ||||||
| ((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData)) | ((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData)) | ||||||
| </programlisting> | </programlisting> | ||||||
|     If this returns true, then it is safe to cast |     If this returns true, then it is safe to cast | ||||||
|     <literal>fcinfo->context</> to type <literal>TriggerData |     <literal>fcinfo->context</> to type <literal>TriggerData | ||||||
| @ -580,7 +580,7 @@ trigf(PG_FUNCTION_ARGS) | |||||||
| 
 | 
 | ||||||
|     /* check for null values */ |     /* check for null values */ | ||||||
|     if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event) |     if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event) | ||||||
|         && TRIGGER_FIRED_BEFORE(trigdata->tg_event)) |         && TRIGGER_FIRED_BEFORE(trigdata->tg_event)) | ||||||
|         checknull = true; |         checknull = true; | ||||||
| 
 | 
 | ||||||
|     if (TRIGGER_FIRED_BEFORE(trigdata->tg_event)) |     if (TRIGGER_FIRED_BEFORE(trigdata->tg_event)) | ||||||
|  | |||||||
| @ -401,7 +401,7 @@ WHERE t.author_id = p.person_id; | |||||||
|    </para> |    </para> | ||||||
|    <para> |    <para> | ||||||
|     Also note that if either the document or stylesheet values do not |     Also note that if either the document or stylesheet values do not | ||||||
|     begin with a < then they will be treated as URLs and libxslt will |     begin with a < then they will be treated as URLs and libxslt will | ||||||
|     fetch them. It thus follows that you can use xslt_process as a means |     fetch them. It thus follows that you can use xslt_process as a means | ||||||
|     to fetch the contents of URLs - you should be aware of the security |     to fetch the contents of URLs - you should be aware of the security | ||||||
|     implications of this. |     implications of this. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user