Re: [DOCS] [BUGS] BUG #3767: tsearch2 index creation fatal crash
"Thomas H." <[EMAIL PROTECTED]> writes: > i saw my mistake. i misinterpreted the examples to show the possibility > to convert *any* text by using casting to tsvector as an alternative to > using to_tsvector :) Yeah, the examples in section 12.1.2 are not actually good practice: both sides of the match should usually get normalized before comparison, and these examples don't do that. I'm not sure that putting in to_tsvector calls there would be an improvement, though, since at that point we haven't introduced to_tsvector. Thoughts anyone? regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [DOCS] [BUGS] BUG #3767: tsearch2 index creation fatal crash
Tom Lane wrote: > "Thomas H." <[EMAIL PROTECTED]> writes: > > i saw my mistake. i misinterpreted the examples to show the possibility > > to convert *any* text by using casting to tsvector as an alternative to > > using to_tsvector :) > > Yeah, the examples in section 12.1.2 are not actually good practice: > both sides of the match should usually get normalized before comparison, > and these examples don't do that. > > I'm not sure that putting in to_tsvector calls there would be an > improvement, though, since at that point we haven't introduced > to_tsvector. > > Thoughts anyone? Yep, I saw that chicken and egg problem in the docs when I was reviewing it long ago. I never came up with a solution either. We would have to introduce configurations a lot earlier, but how would you explain them when you don't know what a tsvector is. -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [DOCS] [BUGS] BUG #3767: tsearch2 index creation fatal crash
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I'm not sure that putting in to_tsvector calls there would be an >> improvement, though, since at that point we haven't introduced >> to_tsvector. >> >> Thoughts anyone? > Yep, I saw that chicken and egg problem in the docs when I was reviewing > it long ago. I never came up with a solution either. OTOH, I see that the very next sentence mentions to_tsquery without defining it. So maybe it wouldn't be materially less readable if we just changed the examples to use to_tsquery and to_tsvector instead of literal-casting. Either way, there is something going on that doesn't meet the eye, and we might as well write an example that is actually OK practice rather than bad practice. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [DOCS] [BUGS] BUG #3767: tsearch2 index creation fatal crash
>> I'm not sure that putting in to_tsvector calls there would be an >> improvement, though, since at that point we haven't introduced >> to_tsvector. Uh ... wait a moment ... stop the presses. Thomas is looking at beta1 documentation. CVS HEAD handles this a bit better I think: http://developer.postgresql.org/pgdocs/postgres/textsearch-intro.html#TEXTSEARCH-MATCHING So the first thing is to go bug the www team about updating the online 8.3beta docs, which I shall do forthwith. regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
