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

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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to