mirror of https://github.com/postgres/postgres
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 testidx ON test USING gist (a);
|
||||
-- query
|
||||
SELECT * FROM test WHERE a < 10;
|
||||
SELECT * FROM test WHERE a < 10;
|
||||
</programlisting>
|
||||
</sect2>
|
||||
|
||||
|
|
|
@ -287,28 +287,28 @@ a = b Same as
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
a && b Overlaps
|
||||
a && b Overlaps
|
||||
</programlisting>
|
||||
<para>
|
||||
The cubements a and b overlap.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
a @> b Contains
|
||||
a @> b Contains
|
||||
</programlisting>
|
||||
<para>
|
||||
The cubement a contains the cubement b.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
a <@ b Contained in
|
||||
a <@ b Contained in
|
||||
</programlisting>
|
||||
<para>
|
||||
The cubement a is contained in b.
|
||||
</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
|
||||
deprecated and will eventually be retired. Notice that the old names
|
||||
are reversed from the convention formerly followed by the core geometric
|
||||
|
@ -326,8 +326,8 @@ a <@ b Contained in
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
[a, b] < [c, d] Less than
|
||||
[a, b] > [c, d] Greater than
|
||||
[a, b] < [c, d] Less than
|
||||
[a, b] > [c, d] Greater than
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
|
@ -462,10 +462,10 @@ a <@ b Contained in
|
|||
is useful for creating bounding boxes around a point for searching for
|
||||
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
|
||||
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.
|
||||
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
|
||||
is an effective maximum on the dimension of cubes of 100. This is set
|
||||
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">
|
||||
<title id="datatype-title">Data Types</title>
|
||||
|
@ -3440,10 +3440,10 @@ SELECT 'fat:ab & cat'::tsquery;
|
|||
function is convenient for performing such normalization:
|
||||
|
||||
<programlisting>
|
||||
SELECT to_tsquery('Fat:ab & Cats');
|
||||
SELECT to_tsquery('Fat:ab & Cats');
|
||||
to_tsquery
|
||||
------------------
|
||||
'fat':AB & 'cat'
|
||||
'fat':AB & 'cat'
|
||||
</programlisting>
|
||||
</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">
|
||||
<title>Data Definition</title>
|
||||
|
@ -2312,7 +2312,7 @@ VALUES ('New York', NULL, NULL, 'NY');
|
|||
|
||||
<para>
|
||||
To set up a partitioned table, do the following:
|
||||
<orderedlist spacing=compact>
|
||||
<orderedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
Create the <quote>master</quote> table, from which all of the
|
||||
|
@ -2430,7 +2430,7 @@ CREATE TABLE measurement (
|
|||
</para>
|
||||
|
||||
<para>
|
||||
<orderedlist spacing=compact>
|
||||
<orderedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>
|
||||
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">
|
||||
<title>Data Manipulation</title>
|
||||
|
@ -135,7 +135,7 @@ INSERT INTO products (product_no, name, price) VALUES
|
|||
|
||||
<para>
|
||||
To perform an update, you need three pieces of information:
|
||||
<orderedlist spacing=compact>
|
||||
<orderedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>The name of the table and column to update,</para>
|
||||
</listitem>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><@></literal> operator</entry>
|
||||
<entry><literal><@></literal> operator</entry>
|
||||
<entry>gives the distance in statute miles between
|
||||
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
|
||||
|
|
|
@ -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">
|
||||
<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
|
||||
|
||||
%.c: %.pgc
|
||||
$(ECPG) $<
|
||||
$(ECPG) $<
|
||||
</programlisting>
|
||||
</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">
|
||||
<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><type>tsquery</type></entry>
|
||||
<entry>normalize words and convert to <type>tsquery</></entry>
|
||||
<entry><literal>to_tsquery('english', 'The & Fat & Rats')</literal></entry>
|
||||
<entry><literal>'fat' & 'rat'</literal></entry>
|
||||
<entry><literal>to_tsquery('english', 'The & Fat & Rats')</literal></entry>
|
||||
<entry><literal>'fat' & 'rat'</literal></entry>
|
||||
</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><type>tsquery</type></entry>
|
||||
<entry>produce <type>tsquery</> ignoring punctuation</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>
|
||||
<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><type>text</type></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>
|
||||
</row>
|
||||
<row>
|
||||
|
|
|
@ -41,30 +41,30 @@ INSERT INTO s VALUES ('jack');
|
|||
|
||||
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
|
||||
'select soundex($1) = soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
CREATE FUNCTION text_sx_lt(text, text) RETURNS boolean AS
|
||||
'select soundex($1) < soundex($2)'
|
||||
'select soundex($1) < soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
CREATE FUNCTION text_sx_gt(text, text) RETURNS boolean AS
|
||||
'select soundex($1) > soundex($2)'
|
||||
'select soundex($1) > soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
CREATE FUNCTION text_sx_le(text, text) RETURNS boolean AS
|
||||
'select soundex($1) <= soundex($2)'
|
||||
'select soundex($1) <= soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
CREATE FUNCTION text_sx_ge(text, text) RETURNS boolean AS
|
||||
'select soundex($1) >= soundex($2)'
|
||||
'select soundex($1) >= soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
CREATE FUNCTION text_sx_ne(text, text) RETURNS boolean AS
|
||||
'select soundex($1) <> soundex($2)'
|
||||
'select soundex($1) <> soundex($2)'
|
||||
LANGUAGE SQL;
|
||||
|
||||
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 difference(s.nm, 'john') > 2;
|
||||
SELECT * FROM s WHERE difference(s.nm, 'john') > 2;
|
||||
</programlisting>
|
||||
</sect2>
|
||||
|
||||
|
|
|
@ -131,15 +131,15 @@ test=# select intset(1);
|
|||
</thead>
|
||||
<tbody>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -172,7 +172,7 @@ test=# select intset(1);
|
|||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>int[] & int[]</literal></entry>
|
||||
<entry><literal>int[] & int[]</literal></entry>
|
||||
<entry>returns intersection of arrays</entry>
|
||||
</row>
|
||||
|
||||
|
@ -192,7 +192,7 @@ test=# select intset(1);
|
|||
</tgroup>
|
||||
</table>
|
||||
<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
|
||||
deprecated and will eventually be retired. Notice that the old names
|
||||
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);
|
||||
|
||||
-- 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 message.mid FROM message WHERE message.sections @> '{1,2}';
|
||||
SELECT message.mid FROM message WHERE message.sections @> '{1,2}';
|
||||
-- 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>
|
||||
</sect2>
|
||||
|
||||
|
@ -230,7 +230,7 @@ SELECT message.mid FROM message WHERE '{1,2}' <@ message.sections;
|
|||
<programlisting>
|
||||
cd ./bench
|
||||
1. createdb TEST
|
||||
2. psql TEST < ../_int.sql
|
||||
2. psql TEST < ../_int.sql
|
||||
3. ./create_test.pl | psql TEST
|
||||
4. ./bench.pl - perl script to benchmark queries, supports OR, AND queries
|
||||
with/without RD-Tree. Run script without arguments to
|
||||
|
|
|
@ -244,52 +244,52 @@
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
ISBN13 -> EAN13
|
||||
ISBN13 -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISMN13 -> EAN13
|
||||
ISMN13 -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISSN13 -> EAN13
|
||||
ISSN13 -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISBN -> EAN13
|
||||
ISBN -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISMN -> EAN13
|
||||
ISMN -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISSN -> EAN13
|
||||
ISSN -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
UPC -> EAN13
|
||||
UPC -> EAN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISBN <-> ISBN13
|
||||
ISBN <-> ISBN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISMN <-> ISMN13
|
||||
ISMN <-> ISMN13
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
ISSN <-> ISSN13
|
||||
ISSN <-> ISSN13
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
</itemizedlist>
|
||||
|
||||
<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
|
||||
some internal changes, I feel it should become a permanent built-in type.
|
||||
</para>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<sect2>
|
||||
<title>Definitions</title>
|
||||
<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
|
||||
example, [a-zA-Z0-9] for C locale). The length of a label is limited by 256
|
||||
bytes.
|
||||
|
@ -24,9 +24,9 @@
|
|||
Example: 'Countries', 'Personal_Services'
|
||||
</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
|
||||
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
|
||||
DMOZ catalogue - <ulink url="http://www.dmoz.org"></ulink>, is about 240
|
||||
bytes!)
|
||||
|
@ -85,7 +85,7 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<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>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -143,7 +143,7 @@
|
|||
the end of word. The meaning of modifiers are the same as for lquery.
|
||||
</para>
|
||||
<para>
|
||||
Example: <literal>'Europe & Russia*@ & !Transportation'</literal>
|
||||
Example: <literal>'Europe & Russia*@ & !Transportation'</literal>
|
||||
</para>
|
||||
<para>
|
||||
Search paths contain words 'Europe' and 'Russia*' (case-insensitive) and
|
||||
|
@ -164,21 +164,21 @@
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal><,>,<=,>=,=, <></literal>
|
||||
<literal><,>,<=,>=,=, <></literal>
|
||||
- Have their usual meanings. Comparison is doing in the order of direct
|
||||
tree traversing, children of a node are sorted lexicographic.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>ltree @> ltree</literal>
|
||||
<literal>ltree @> ltree</literal>
|
||||
- returns TRUE if left argument is an ancestor of right argument (or
|
||||
equal).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>ltree <@ ltree </literal>
|
||||
<literal>ltree <@ ltree </literal>
|
||||
- returns TRUE if left argument is a descendant of right argument (or
|
||||
equal).
|
||||
</para>
|
||||
|
@ -216,13 +216,13 @@
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>ltree[] @> ltree, ltree <@ ltree[]</literal>
|
||||
<literal>ltree[] @> ltree, ltree <@ ltree[]</literal>
|
||||
- returns TRUE if array ltree[] contains an ancestor of ltree.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>ltree @> ltree[], ltree[] <@ ltree</literal>
|
||||
<literal>ltree @> ltree[], ltree[] <@ ltree</literal>
|
||||
- returns TRUE if array ltree[] contains a descendant of ltree.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -248,7 +248,7 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<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
|
||||
and NULL in vice versa.
|
||||
|
@ -292,7 +292,7 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para>GiST index over ltree[]:
|
||||
<literal>ltree[]<@ ltree, ltree @> ltree[], @, ~, ?.</literal>
|
||||
<literal>ltree[]<@ ltree, ltree @> ltree[], @, ~, ?.</literal>
|
||||
</para>
|
||||
<para>
|
||||
Example:
|
||||
|
@ -418,8 +418,8 @@
|
|||
<title>Example</title>
|
||||
<programlisting>
|
||||
createdb ltreetest
|
||||
psql ltreetest < /usr/local/pgsql/share/contrib/ltree.sql
|
||||
psql ltreetest < ltreetest.sql
|
||||
psql ltreetest < /usr/local/pgsql/share/contrib/ltree.sql
|
||||
psql ltreetest < ltreetest.sql
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
|
@ -445,7 +445,7 @@ shown below:
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
ltreetest=# select path from test where path <@ 'Top.Science';
|
||||
ltreetest=# select path from test where path <@ 'Top.Science';
|
||||
path
|
||||
------------------------------------
|
||||
Top.Science
|
||||
|
@ -481,7 +481,7 @@ ltreetest=# select path from test where path ~ '*.!pictures@.*.Astronomy.*';
|
|||
Full text search:
|
||||
</para>
|
||||
<programlisting>
|
||||
ltreetest=# select path from test where path @ 'Astro*% & !pictures@';
|
||||
ltreetest=# select path from test where path @ 'Astro*% & !pictures@';
|
||||
path
|
||||
------------------------------------
|
||||
Top.Science.Astronomy
|
||||
|
@ -490,7 +490,7 @@ ltreetest=# select path from test where path @ 'Astro*% & !pictures@';
|
|||
Top.Hobbies.Amateurs_Astronomy
|
||||
(4 rows)
|
||||
|
||||
ltreetest=# select path from test where path @ 'Astro* & !pictures@';
|
||||
ltreetest=# select path from test where path @ 'Astro* & !pictures@';
|
||||
path
|
||||
------------------------------------
|
||||
Top.Science.Astronomy
|
||||
|
@ -502,7 +502,7 @@ ltreetest=# select path from test where path @ 'Astro* & !pictures@';
|
|||
Using Functions:
|
||||
</para>
|
||||
<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?
|
||||
------------------------------------------
|
||||
Top.Science.Space.Astronomy
|
||||
|
@ -519,7 +519,7 @@ LANGUAGE SQL IMMUTABLE;
|
|||
</para>
|
||||
|
||||
<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
|
||||
------------------------------------------
|
||||
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));'
|
||||
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
|
||||
------------------------------------------
|
||||
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
|
||||
</para>
|
||||
<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}';
|
||||
parentpath | count
|
||||
-----------------------------------+-------
|
||||
|
@ -620,7 +620,7 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where
|
|||
Q3: Get all parents
|
||||
</para>
|
||||
<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
|
||||
--------------------------
|
||||
|
@ -636,8 +636,8 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where
|
|||
Q4: Get all parents with counting of children
|
||||
</para>
|
||||
<programlisting>
|
||||
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;
|
||||
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;
|
||||
path | count
|
||||
--------------------------+--------
|
||||
Top | 300273
|
||||
|
@ -753,7 +753,7 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where
|
|||
<para>
|
||||
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
|
||||
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.
|
||||
</para>
|
||||
</sect2>
|
||||
|
@ -768,4 +768,3 @@ ltreetest=# select ins_label(path,'Top.Science'::ltree,'Space') from test where
|
|||
</para>
|
||||
</sect2>
|
||||
</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">
|
||||
<title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title>
|
||||
|
@ -704,7 +704,7 @@ IF x < y THEN ...
|
|||
</programlisting>
|
||||
what happens behind the scenes is
|
||||
<programlisting>
|
||||
PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2;
|
||||
PREPARE <replaceable>statement_name</>(integer, integer) AS SELECT $1 < $2;
|
||||
</programlisting>
|
||||
and then this prepared statement is <command>EXECUTE</>d for each
|
||||
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">
|
||||
<title>PL/Tcl - Tcl Procedural Language</title>
|
||||
|
@ -164,7 +164,7 @@ CREATE FUNCTION overpaid(employee) RETURNS boolean AS $$
|
|||
if {200000.0 < $1(salary)} {
|
||||
return "t"
|
||||
}
|
||||
if {$1(age) < 30 && 100000.0 < $1(salary)} {
|
||||
if {$1(age) < 30 && 100000.0 < $1(salary)} {
|
||||
return "t"
|
||||
}
|
||||
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
|
||||
-->
|
||||
|
||||
|
@ -270,7 +270,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
|
|||
<programlisting>
|
||||
CREATE OPERATOR CLASS gist__int_ops
|
||||
DEFAULT FOR TYPE _int4 USING gist AS
|
||||
OPERATOR 3 &&,
|
||||
OPERATOR 3 &&,
|
||||
OPERATOR 6 = RECHECK,
|
||||
OPERATOR 7 @>,
|
||||
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:
|
||||
|
@ -4833,7 +4833,7 @@ current_date < 2017-11-17
|
|||
</para>
|
||||
|
||||
<para>
|
||||
The new operators are <literal>&</> (and), <literal>|</>
|
||||
The new operators are <literal>&</> (and), <literal>|</>
|
||||
(or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>,
|
||||
<type>inet</> <literal>-</> <type>int8</>, and
|
||||
<type>inet</> <literal>-</> <type>inet</>.
|
||||
|
@ -8879,8 +8879,8 @@ psql -t -f fixseq.sql db1 | psql -e db1
|
|||
|
||||
<listitem>
|
||||
<para>
|
||||
Remove the <literal><<</>, <literal>>></>,
|
||||
<literal>&<</>, and <literal>&></> operators from
|
||||
Remove the <literal><<</>, <literal>>></>,
|
||||
<literal>&<</>, and <literal>&></> operators from
|
||||
<filename>/contrib/cube</>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -10248,7 +10248,7 @@ typedefs (Michael)</para></listitem>
|
|||
<listitem>
|
||||
<para>
|
||||
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
|
||||
release supports NT-based Windows releases like
|
||||
<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)
|
||||
Fix too long syslog message (Tatsuo)
|
||||
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)
|
||||
</programlisting>
|
||||
</para>
|
||||
|
@ -21039,7 +21039,7 @@ Source Tree Changes
|
|||
Add new html development tools, and flow chart in /tools/backend
|
||||
Fix for SCO compiles
|
||||
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)
|
||||
Add script to check regression test results
|
||||
Break parser functions into smaller files, group together(Bruce)
|
||||
|
@ -21225,7 +21225,7 @@ Enhancements
|
|||
------------
|
||||
Default genetic optimizer GEQO parameter is now 8(Bruce)
|
||||
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
|
||||
Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(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)
|
||||
Add "//" single-line comments(Bruce)
|
||||
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)
|
||||
Support WITH TIME ZONE 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)
|
||||
Add routines for text trimming on both ends, substring, and string position(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)
|
||||
Speed up backend start-up after profiling analysis(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)
|
||||
Make functions static where possible(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
|
||||
Portability fix for pg_dumpall(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)
|
||||
"drop" manual page now "drop_table"(Bruce)
|
||||
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 PGINDENT and support program(Bruce)
|
||||
Massive commit to run PGINDENT on all *.c and *.h files(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>
|
||||
</para>
|
||||
</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 restriction on who can create C functions(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 default decimal constant representation from float4 to float8(Bruce)
|
||||
European date format now set when postmaster is started
|
||||
|
|
|
@ -72,7 +72,7 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||
<para>
|
||||
The external representation of an interval is formed using one or two
|
||||
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.
|
||||
</para>
|
||||
|
||||
|
@ -82,35 +82,35 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||
<tbody>
|
||||
<row>
|
||||
<entry>rule 1</entry>
|
||||
<entry>seg -> boundary PLUMIN deviation</entry>
|
||||
<entry>seg -> boundary PLUMIN deviation</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 2</entry>
|
||||
<entry>seg -> boundary RANGE boundary</entry>
|
||||
<entry>seg -> boundary RANGE boundary</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 3</entry>
|
||||
<entry>seg -> boundary RANGE</entry>
|
||||
<entry>seg -> boundary RANGE</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 4</entry>
|
||||
<entry>seg -> RANGE boundary</entry>
|
||||
<entry>seg -> RANGE boundary</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 5</entry>
|
||||
<entry>seg -> boundary</entry>
|
||||
<entry>seg -> boundary</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 6</entry>
|
||||
<entry>boundary -> FLOAT</entry>
|
||||
<entry>boundary -> FLOAT</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 7</entry>
|
||||
<entry>boundary -> EXTENSION FLOAT</entry>
|
||||
<entry>boundary -> EXTENSION FLOAT</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>rule 8</entry>
|
||||
<entry>deviation -> FLOAT</entry>
|
||||
<entry>deviation -> FLOAT</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
@ -142,7 +142,7 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||
</row>
|
||||
<row>
|
||||
<entry>EXTENSION</entry>
|
||||
<entry>[<>~]</entry>
|
||||
<entry>[<>~]</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
@ -169,16 +169,16 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><5.0</entry>
|
||||
<entry><5.0</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
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>>5.0</entry>
|
||||
<entry>>5.0</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
|
||||
</entry>
|
||||
</row>
|
||||
|
@ -305,39 +305,39 @@ postgres=> select '10(+-)1'::seg as seg;
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] << [c, d] Is left of
|
||||
[a, b] << [c, d] Is left of
|
||||
</programlisting>
|
||||
<para>
|
||||
The left operand, [a, b], occurs entirely to the left of the
|
||||
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>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] >> [c, d] Is right of
|
||||
[a, b] >> [c, d] Is right of
|
||||
</programlisting>
|
||||
<para>
|
||||
[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>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] &< [c, d] Overlaps or is left of
|
||||
[a, b] &< [c, d] Overlaps or is left of
|
||||
</programlisting>
|
||||
<para>
|
||||
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>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] &> [c, d] Overlaps or is right of
|
||||
[a, b] &> [c, d] Overlaps or is right of
|
||||
</programlisting>
|
||||
<para>
|
||||
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>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -351,7 +351,7 @@ postgres=> select '10(+-)1'::seg as seg;
|
|||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] && [c, d] Overlaps
|
||||
[a, b] && [c, d] Overlaps
|
||||
</programlisting>
|
||||
<para>
|
||||
The segments [a, b] and [c, d] overlap.
|
||||
|
@ -359,25 +359,25 @@ postgres=> select '10(+-)1'::seg as seg;
|
|||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] @> [c, d] Contains
|
||||
[a, b] @> [c, d] Contains
|
||||
</programlisting>
|
||||
<para>
|
||||
The segment [a, b] contains the segment [c, d], that is,
|
||||
a <= c and b >= d
|
||||
a <= c and b >= d
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<programlisting>
|
||||
[a, b] <@ [c, d] Contained in
|
||||
[a, b] <@ [c, d] Contained in
|
||||
</programlisting>
|
||||
<para>
|
||||
The segment [a, b] is contained in [c, d], that is,
|
||||
a >= c and b <= d
|
||||
a >= c and b <= d
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<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
|
||||
deprecated and will eventually be retired. Notice that the old names
|
||||
are reversed from the convention formerly followed by the core geometric
|
||||
|
@ -393,8 +393,8 @@ postgres=> select '10(+-)1'::seg as seg;
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
[a, b] < [c, d] Less than
|
||||
[a, b] > [c, d] Greater than
|
||||
[a, b] < [c, d] Less than
|
||||
[a, b] > [c, d] Greater than
|
||||
</programlisting>
|
||||
<para>
|
||||
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:
|
||||
</para>
|
||||
<programlisting>
|
||||
<== values columns ==>
|
||||
<== values columns ==>
|
||||
row_name category_1 category_2
|
||||
---------+------------+------------
|
||||
row1 val1 val2
|
||||
|
@ -286,7 +286,7 @@ crosstab(text sql, int N)
|
|||
the example crosstab function produces a set something like:
|
||||
</para>
|
||||
<programlisting>
|
||||
<== values columns ==>
|
||||
<== values columns ==>
|
||||
row_name category_1 category_2
|
||||
---------+------------+------------
|
||||
row1 val1 val2
|
||||
|
@ -479,7 +479,7 @@ SELECT DISTINCT cat FROM foo;
|
|||
the example crosstab function produces a set something like:
|
||||
</para>
|
||||
<programlisting>
|
||||
<== values columns ==>
|
||||
<== values columns ==>
|
||||
row_name extra cat1 cat2 cat3 cat4
|
||||
---------+-------+------+------+------+------
|
||||
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">
|
||||
<title>Triggers</title>
|
||||
|
@ -288,7 +288,7 @@ CALLED_AS_TRIGGER(fcinfo)
|
|||
</programlisting>
|
||||
which expands to:
|
||||
<programlisting>
|
||||
((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData))
|
||||
((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData))
|
||||
</programlisting>
|
||||
If this returns true, then it is safe to cast
|
||||
<literal>fcinfo->context</> to type <literal>TriggerData
|
||||
|
@ -580,7 +580,7 @@ trigf(PG_FUNCTION_ARGS)
|
|||
|
||||
/* check for null values */
|
||||
if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event)
|
||||
&& TRIGGER_FIRED_BEFORE(trigdata->tg_event))
|
||||
&& TRIGGER_FIRED_BEFORE(trigdata->tg_event))
|
||||
checknull = true;
|
||||
|
||||
if (TRIGGER_FIRED_BEFORE(trigdata->tg_event))
|
||||
|
|
|
@ -401,7 +401,7 @@ WHERE t.author_id = p.person_id;
|
|||
</para>
|
||||
<para>
|
||||
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
|
||||
to fetch the contents of URLs - you should be aware of the security
|
||||
implications of this.
|
||||
|
|
Loading…
Reference in New Issue