Skip site navigation (1) Skip section navigation (2)

Testing the other tsearch dictionaries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Testing the other tsearch dictionaries
Date: 2007-08-25 02:43:28
Message-ID: 26249.1188009808@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
I was a bit unhappy to realize just now that the patch Heikki sent in,
and I reviewed and applied, actually broke dict_synonym.  (Modifying a
string tends to modify the result of strlen() ...)  While we can't
cover *everything* in the regression tests, it now seems like a bad
idea that the tsearch.sql test has no coverage at all for the ispell,
synonym, or thesaurus templates.

The difficulty in testing these is that they require configuration
files, which the regression tests really can't install.  (If the
configuration were all inside the database it wouldn't be such a
problem, but that's a lost cause for 8.3...)

For synonym and thesaurus, we could rename the sample files that
are currently installed so that they'd be actually accessible as
config files, that is something like
	synonym.syn.sample   => synonym-sample.syn
	thesaurus.ths.sample => thesaurus-sample.ths
and then perform tests using those.  (This would also provide
test coverage for CREATE TEXT SEARCH DICTIONARY etc, which
wouldn't be a bad thing.)

The downsides I can see of this are (1) it'd expose some rather
useless test files as things that people could create dictionaries
with, and (2) someone might then alter the sample file and thereby
cause regression tests to fail on their installation.  Neither of
these seem terribly bad, but has anyone got an objection or better
idea?

Also, we don't currently have any sample config files for ispell;
but this is surely a loser from a documentation standpoint as well
as a testing standpoint, so I think we should provide some.

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2007-08-25 02:50:11
Subject: max client limit in pgbench
Previous:From: Tom LaneDate: 2007-08-25 01:14:57
Subject: Re: SQL feature requests

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group