Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> People are likely to search for statute cites, which tend to have a
>> hierarchical form.
> I think what you need is a custom parser
I've just returned to this and after review have become convinced that
this is absolutely necessary; once the default parser has done its
work, figuring out the bounds of a statute cite would be next to
impossible. Examples of the kind of fun you can have labeling
statutes, ordinances, and rules should you ever get elected to public
office:
10-3-350.10(1)(k)
10.1(40)(d)1
10.40.040(c)(2)
100.525(2)(a)3
105-10.G(3)(a)
11.04C.3.R.(1)
8.961.41(cm)
9.125.07(4A)(3)
947.013(1m)(a)
In any of these, a search string which exactly matches something up to
(but not including) a dash, dot, or left paren should find that thing.
> Unfortunately we don't seem to have any really easy way to plug in a
> custom parser, other than copy-paste-modify the existing one which
> would be a PITA from a maintenance standpoint.
I'm afraid I'm going to have to bite the bullet and do this anyway.
Any guidance on how to go about it may save me some time. Also, if
there is any way to do this which may be useful to others or integrate
into PostgreSQL to reduce the long-term PITA aspect, I'm all ears.
-Kevin