Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 7403C2E004D; Wed, 21 Nov 2007 01:12:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 74801-05-3; Wed, 21 Nov 2007 01:12:06 -0400 (AST) Received: from mx1.hub.org (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 505492E005E; Wed, 21 Nov 2007 01:06:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx1.hub.org (Postfix) with ESMTP id 06E3516DA4E1; Wed, 21 Nov 2007 01:06:12 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lAL54r1t023714; Wed, 21 Nov 2007 00:04:53 -0500 (EST) To: Bruce Momjian cc: "Thomas H." , pgsql-bugs@postgresql.org, pgsql-docs@postgresql.org Subject: Re: BUG #3767: tsearch2 index creation fatal crash In-reply-to: <200711210458.lAL4wpN06312@momjian.us> References: <200711210458.lAL4wpN06312@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 20 Nov 2007 23:58:51 -0500" Date: Wed, 21 Nov 2007 00:04:53 -0500 Message-ID: <23713.1195621493@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/267 X-Sequence-Number: 18911 Bruce Momjian 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