Re: [DOCS] About contrib modules
A Dijous 22 Novembre 2007, Bruce Momjian va escriure:
> [EMAIL PROTECTED] wrote:
> > I'm sorry I haven't said anything yet. I've got no Internet connection at
> > home. I'll work on the remaining work on contrib docs as soon as my
> > Internet connection is restablished.
>
> Thanks. We probably have 1-2 weeks left to get it into 8.3 final.
Attached, the dict_int and dict_xsyn SGML docs.
Now I'll work on the lost changes of the already SGML'ed docs.
--
Albert Cervera i Areny
http://www.NaN-tic.com
Index: contrib.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/contrib.sgml,v
retrieving revision 1.4
diff -c -r1.4 contrib.sgml
*** contrib.sgml 14 Nov 2007 02:36:43 - 1.4
--- contrib.sgml 2 Dec 2007 17:32:09 -
***
*** 82,87
--- 82,89
&chkpass;
&cube;
&dblink;
+ &dict-int;
+ &dict-xsyn;
&earthdistance;
&fuzzystrmatch;
&hstore;
Index: filelist.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/filelist.sgml,v
retrieving revision 1.53
diff -c -r1.53 filelist.sgml
*** filelist.sgml 14 Nov 2007 01:09:50 - 1.53
--- filelist.sgml 2 Dec 2007 17:32:10 -
***
*** 96,101
--- 96,103
+
+
dict_int
The motivation for this example dictionary is to control the indexing of
integers (signed and unsigned), and, consequently, to minimize the number of
unique words which greatly affect the performance of searching.
Configuration
The dictionary accepts two options:
The MAXLEN parameter specifies the maximum length (number of digits)
allowed in an integer word. The default value is 6.
The REJECTLONG parameter specifies if an overlength integer should be
truncated or ignored. If REJECTLONG=FALSE (default), the dictionary returns
the first MAXLEN digits of the integer. If REJECTLONG=TRUE, the
dictionary treats an overlength integer as a stop word, so that it will
not be indexed.
Usage
mydb# select ts_lexize('intdict', '12345678');
ts_lexize
---
{123456}
Change dictionary options:
mydb# ALTER TEXT SEARCH DICTIONARY intdict (MAXLEN = 4, REJECTLONG = true);
ALTER TEXT SEARCH DICTIONARY
dict_xsyn
The Extended Synonym Dictionary module replaces words with groups of their
synonyms, and so makes it possible to search for a word using any of its
synonyms.
Configuration
It accepts the following options:
KEEPORIG controls whether the original word is included, or only its
synonyms. Default is 'true'.
RULES is the base name of the file containing the list of synonyms.
This file must be in $(prefix)/share/tsearch_data/, and its name must
end in ".rules" (which is not included in the RULES parameter).
The rules file has the following format:
Each line represents a group of synonyms for a single word, which is
given first on the line. Synonyms are separated by whitespace:
word syn1 syn2 syn3
Sharp ('#') sign is a comment delimiter. It may appear at any position
inside the line. The rest of the line will be skipped.
Look at xsyn_sample.rules, which is installed in $(prefix)/share/tsearch_data/,
for an example.
Usage
mydb=# SELECT ts_lexize('xsyn','word');
ts_lexize
{word,syn1,syn2,syn3)
Change dictionary options:
mydb# ALTER TEXT SEARCH DICTIONARY xsyn (KEEPORIG=false);
ALTER TEXT SEARCH DICTIONARY
---(end of broadcast)---
TIP 6: explain analyze is your friend
Re: [PATCHES] [DOCS] Partition: use triggers instead of rules
David Fetter <[EMAIL PROTECTED]> writes: > On Fri, Nov 30, 2007 at 12:34:05PM +0530, NikhilS wrote: >> Another reason to go along with triggers is that "COPY" honors >> triggers, but does not honor rules. While trying to do bulk inserts >> into a parent of partitioned tables where rules are being employed, >> the COPY operation will not be so straightforward. > Does my latest patch attached address this well enough? Applied with revisions and extensions. (I take it you hadn't actually tested the example :-() regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [DOCS] About contrib modules
Albert Cervera i Areny <[EMAIL PROTECTED]> writes: > Attached, the dict_int and dict_xsyn SGML docs. Applied, thanks. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [DOCS] About contrib modules
A Dijous 22 Novembre 2007, Bruce Momjian va escriure:
> [EMAIL PROTECTED] wrote:
> > I'm sorry I haven't said anything yet. I've got no Internet connection at
> > home. I'll work on the remaining work on contrib docs as soon as my
> > Internet connection is restablished.
>
> Thanks. We probably have 1-2 weeks left to get it into 8.3 final.
Attached, contrib docs with the changes of the last months. Had to update
cube, apart from most modules of Tom's list. Everything should be up to date
now.
--
Albert Cervera i Areny
http://www.NaN-tic.com
Index: cube.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/cube.sgml,v
retrieving revision 1.2
diff -c -r1.2 cube.sgml
*** cube.sgml 11 Nov 2007 14:23:18 - 1.2
--- cube.sgml 2 Dec 2007 23:32:29 -
***
*** 353,358
--- 353,364
+ cube(text)
+ Takes text input and returns a cube. This is useful for making
+ cubes from computed strings.
+
+
+
cube(float8) returns cube
This makes a one dimensional cube with both coordinates the same.
If the type of the argument is a numeric type other than float8 an
Index: intarray.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/intarray.sgml,v
retrieving revision 1.2
diff -c -r1.2 intarray.sgml
*** intarray.sgml 12 Nov 2007 01:37:34 - 1.2
--- intarray.sgml 2 Dec 2007 23:32:29 -
***
*** 12,20
Current implementation provides index support for one-dimensional array of
! int4's - gist__int_ops, suitable for small and medium size of arrays (used on
default), and gist__intbig_ops for indexing large arrays (we use superimposed
! signature with length of 4096 bits to represent sets).
--- 12,21
Current implementation provides index support for one-dimensional array of
! integers: gist__int_ops, suitable for small and medium size of arrays (used by
default), and gist__intbig_ops for indexing large arrays (we use superimposed
! signature with length of 4096 bits to represent sets). There is also a
! non-default gin__int_ops for GIN indexes on integer arrays.
Index: pageinspect.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/pageinspect.sgml,v
retrieving revision 1.1
diff -c -r1.1 pageinspect.sgml
*** pageinspect.sgml 10 Nov 2007 23:30:46 - 1.1
--- pageinspect.sgml 2 Dec 2007 23:32:29 -
***
*** 32,46
A page image obtained with get_raw_page should be passed as argument:
! test=# SELECT * FROM page_header(get_raw_page('pg_class',0));
!lsn| tli | flags | lower | upper | special | pagesize | version
! --+-+---+---+---+-+--+-
! 0/3C5614 | 1 | 1 | 216 | 256 |8192 | 8192 | 4
! (1 row)
! The returned columns correspond to the fields in the PageHeaderData-struct,
! see src/include/storage/bufpage.h for more details.
--- 32,45
A page image obtained with get_raw_page should be passed as argument:
! regression=# SELECT * FROM page_header(get_raw_page('pg_class',0));
! lsn| tli | flags | lower | upper | special | pagesize | version | prune_xid
! ---+-+---+---+---+-+--+-+---
! 0/24A1B50 | 1 | 1 | 232 | 368 |8192 | 8192 | 4 | 0
! The returned columns correspond to the fields in the PageHeaderData struct.
! See src/include/storage/bufpage.h for more details.
Index: pgbench.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/pgbench.sgml,v
retrieving revision 1.2
diff -c -r1.2 pgbench.sgml
*** pgbench.sgml 11 Nov 2007 14:23:18 - 1.2
--- pgbench.sgml 2 Dec 2007 23:32:29 -
***
*** 379,384
--- 379,399
Variables can also be defined by using -D option.
+
+
+
+ \sleep num [us|ms|s] - Causes script execution to sleep for the
+ specified duration of microseconds (us), milliseconds (ms) or the default
+ seconds (s).
+
+
+ Example:
+
+
+ \setrandom millisec 1000 2500
+ \sleep : millisec ms
+
Index: pgrowlocks.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/pgrowlocks.sgml,v
retrieving revision 1.2
diff -c -r1.2 pgrowlocks.sgml
*** pgrowlocks.sgml 11 Nov 2007 14:23:18 - 1.2
--- pgrowlocks.sgml 2 Dec 2007 23:32:29 -
***
*** 102,108
Example
!pgrowlocks returns the following data
Re: [DOCS] About contrib modules
Albert Cervera i Areny <[EMAIL PROTECTED]> writes: > Attached, contrib docs with the changes of the last months. Had to update > cube, apart from most modules of Tom's list. Everything should be up to date > now. Applied, thanks. Are you planning to do any further work on the contrib docs? I'm interested in making an editorial pass over them in the next day or two, but I don't want to create merge conflicts for you if you are about to do more work. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
