Heikki Linnakangas <hlinn...@iki.fi> writes: > This no longer works:
> postgres=# CREATE TEXT SEARCH DICTIONARY public.simple_dict ( > TEMPLATE = pg_catalog.simple, > "STOPWORds" = english > ); > ERROR: unrecognized simple dictionary parameter: "STOPWORds" > In hindsight, perhaps we should always have been more strict about that > to begin wtih, but let's not break backwards-compatibility without a > better reason. I didn't thoroughly check all of the cases here, to see > if there are more like this. You have a point, but I'm not sure that this is such a bad compatibility break as to be a reason not to change things to be more consistent. > It'd be nice to have some kind of a rule on when pg_strcasecmp should be > used and when strcmp() is enough. Currently, by looking at the code, I > can't tell. My thought is that if we are looking at words that have been through the parser, then it should *always* be plain strcmp; we should expect that the parser already did the appropriate case-folding. If the user prevented case-folding by double-quoting, I don't have a lot of sympathy for any complaints about it. Generally speaking, what we're dealing with here is things that are logically keywords but we did not wish to make them real parser keywords. But in SQL, once you quote a keyword, it's not a keyword at all anymore. So I think the argument that quoting "stopwords" should be legal at all in this context is pretty weak, and the argument that quoting a weirdly-cased version of it should work is even weaker. pg_strcasecmp would be appropriate, perhaps, if we're dealing with stuff that somehow came in without going through the parser. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers