Re: Prefix support for synonym dictionary - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Prefix support for synonym dictionary
Date
Msg-id 1249239924.4765.6926.camel@jdavis
Whole thread Raw
In response to Prefix support for synonym dictionary  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: Prefix support for synonym dictionary
Re: Prefix support for synonym dictionary
List pgsql-hackers
Hi,

The patch looks good.

Comments:

1. The docs should be clarified a little. For instance, it should have a
link back to the definition of a prefix search (12.3.2). I included my
doc suggestions as an attachment.

2. dsynonym_init() uses findwrd() in a slightly confusing (and perhaps
fragile) way. After calling findwrd(), the "end" pointer is pointing at
either the end of the string, or the *; depending on whether the string
ends in * and whether flags is NULL. I only mention this because I had
to take a more careful look to see what was happening. Perhaps add a
comment to make it more clear?

3. The patch looks for the special byte '*'. I think that's fine,
because we depend on the files being in UTF-8 encoding, where it's the
same byte. However, I thought it was worth mentioning in case we want to
support other encodings for text search files later.

Regards,
    Jeff Davis




Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Next
From: Jeff Davis
Date:
Subject: compiler warning