pgsql: Add sample text search dictionary templates and parsers, to

Started by Nonameabout 18 years ago7 messages
#1Noname
tgl@postgresql.org

Log Message:
-----------
Add sample text search dictionary templates and parsers, to replace the
hard-to-maintain textual examples currently in the SGML docs. From
Sergey Karpov.

Modified Files:
--------------
pgsql/contrib:
Makefile (r1.80 -> r1.81)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/Makefile?r1=1.80&r2=1.81)
README (r1.93 -> r1.94)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/README?r1=1.93&r2=1.94)

Added Files:
-----------
pgsql/contrib/dict_int:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.dict_int (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/README.dict_int?rev=1.1&content-type=text/x-cvsweb-markup)
dict_int.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/dict_int.c?rev=1.1&content-type=text/x-cvsweb-markup)
dict_int.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/dict_int.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_dict_int.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/uninstall_dict_int.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_int/expected:
dict_int.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/expected/dict_int.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_int/sql:
dict_int.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/sql/dict_int.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.dict_xsyn (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/README.dict_xsyn?rev=1.1&content-type=text/x-cvsweb-markup)
dict_xsyn.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/dict_xsyn.c?rev=1.1&content-type=text/x-cvsweb-markup)
dict_xsyn.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/dict_xsyn.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_dict_xsyn.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/uninstall_dict_xsyn.sql?rev=1.1&content-type=text/x-cvsweb-markup)
xsyn_sample.rules (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/xsyn_sample.rules?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn/expected:
dict_xsyn.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/expected/dict_xsyn.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn/sql:
dict_xsyn.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/sql/dict_xsyn.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.test_parser (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/README.test_parser?rev=1.1&content-type=text/x-cvsweb-markup)
test_parser.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/test_parser.c?rev=1.1&content-type=text/x-cvsweb-markup)
test_parser.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/test_parser.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_test_parser.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/uninstall_test_parser.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser/expected:
test_parser.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/expected/test_parser.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser/sql:
test_parser.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/sql/test_parser.sql?rev=1.1&content-type=text/x-cvsweb-markup)

#2Andrew Dunstan
andrew@dunslane.net
In reply to: Noname (#1)
Re: pgsql: Add sample text search dictionary templates and parsers, to

Looks like dict-xsyn needs some windows install help for the rules file.

cheers

andrew

Tom Lane wrote:

Show quoted text

Log Message:
-----------
Add sample text search dictionary templates and parsers, to replace the
hard-to-maintain textual examples currently in the SGML docs. From
Sergey Karpov.

Modified Files:
--------------
pgsql/contrib:
Makefile (r1.80 -> r1.81)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/Makefile?r1=1.80&r2=1.81)
README (r1.93 -> r1.94)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/README?r1=1.93&r2=1.94)

Added Files:
-----------
pgsql/contrib/dict_int:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.dict_int (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/README.dict_int?rev=1.1&content-type=text/x-cvsweb-markup)
dict_int.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/dict_int.c?rev=1.1&content-type=text/x-cvsweb-markup)
dict_int.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/dict_int.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_dict_int.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/uninstall_dict_int.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_int/expected:
dict_int.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/expected/dict_int.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_int/sql:
dict_int.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_int/sql/dict_int.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.dict_xsyn (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/README.dict_xsyn?rev=1.1&content-type=text/x-cvsweb-markup)
dict_xsyn.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/dict_xsyn.c?rev=1.1&content-type=text/x-cvsweb-markup)
dict_xsyn.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/dict_xsyn.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_dict_xsyn.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/uninstall_dict_xsyn.sql?rev=1.1&content-type=text/x-cvsweb-markup)
xsyn_sample.rules (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/xsyn_sample.rules?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn/expected:
dict_xsyn.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/expected/dict_xsyn.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/dict_xsyn/sql:
dict_xsyn.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dict_xsyn/sql/dict_xsyn.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser:
Makefile (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README.test_parser (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/README.test_parser?rev=1.1&content-type=text/x-cvsweb-markup)
test_parser.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/test_parser.c?rev=1.1&content-type=text/x-cvsweb-markup)
test_parser.sql.in (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/test_parser.sql.in?rev=1.1&content-type=text/x-cvsweb-markup)
uninstall_test_parser.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/uninstall_test_parser.sql?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser/expected:
test_parser.out (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/expected/test_parser.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/contrib/test_parser/sql:
test_parser.sql (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/test_parser/sql/test_parser.sql?rev=1.1&content-type=text/x-cvsweb-markup)

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#2)
Re: pgsql: Add sample text search dictionary templates and parsers, to

Andrew Dunstan <andrew@dunslane.net> writes:

Looks like dict-xsyn needs some windows install help for the rules file.

Ah, I was afraid of that :-(. The bespoke rule for installing that file
looked like trouble but I forgot about it while looking at the rest of
the code.

It doesn't seem like teaching Mkvcbuild.pm about this specific file
would be a real good plan. Can we get the DATA macro to handle it
somehow? It's not going into the toplevel SHAREDIR --- will a relative
path work?

regards, tom lane

#4Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#3)
Re: pgsql: Add sample text search dictionary templates and parsers, to

On Mon, Oct 15, 2007 at 07:17:12PM -0400, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Looks like dict-xsyn needs some windows install help for the rules file.

Ah, I was afraid of that :-(. The bespoke rule for installing that file
looked like trouble but I forgot about it while looking at the rest of
the code.

It doesn't seem like teaching Mkvcbuild.pm about this specific file
would be a real good plan. Can we get the DATA macro to handle it
somehow? It's not going into the toplevel SHAREDIR --- will a relative
path work?

The msvc Install.pm file (not Mkvcbuild in this case) will put it in
/share/contrib/, and currently doesn't support subdirs. But it can bemade
to support those if needed, I guess. No idea if that'll work on non-msvc
builds.

Do we expect there might be more like this? We could easily add a rule
to Install.pm to know about DICTFILES rules in addition to DATA rules.. (In
CopyContribFiles in Install.pm)

//Magnus

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#4)
Re: pgsql: Add sample text search dictionary templates and parsers, to

Magnus Hagander <magnus@hagander.net> writes:

Do we expect there might be more like this? We could easily add a rule
to Install.pm to know about DICTFILES rules in addition to DATA
rules..

Yeah, after sleeping on it I think we need a general-purpose solution.
There are likely to be more not fewer tsearch-related contrib modules
in future; and even if you don't believe that, people will certainly
want to use the PGXS infrastructure to build add-on dictionaries.
So we should provide a DATA-like macro to specify installing stuff
into $SHAREDIR/tsearch_data/, instead of making everyone reinvent the
hack that's currently in dict_xsyn/Makefile.

I was going to propose calling it DATA_TSEARCH, but DICTFILES would
work too. Any preferences?

regards, tom lane

#6Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#5)
Re: pgsql: Add sample text search dictionary templates and parsers, to

On Tue, Oct 16, 2007 at 10:05:27AM -0400, Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

Do we expect there might be more like this? We could easily add a rule
to Install.pm to know about DICTFILES rules in addition to DATA
rules..

Yeah, after sleeping on it I think we need a general-purpose solution.
There are likely to be more not fewer tsearch-related contrib modules
in future; and even if you don't believe that, people will certainly
want to use the PGXS infrastructure to build add-on dictionaries.
So we should provide a DATA-like macro to specify installing stuff
into $SHAREDIR/tsearch_data/, instead of making everyone reinvent the
hack that's currently in dict_xsyn/Makefile.

I was going to propose calling it DATA_TSEARCH, but DICTFILES would
work too. Any preferences?

DATA_TSEARCH seems better, it indicates where the files are going even
clearer.

//Magnus

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#6)
Re: pgsql: Add sample text search dictionary templates and parsers, to

Magnus Hagander <magnus@hagander.net> writes:

DATA_TSEARCH seems better, it indicates where the files are going even
clearer.

Done.

regards, tom lane