Skip site navigation (1) Skip section navigation (2)

Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Date: 2007-11-14 03:50:41
Message-ID: 13005.1195012241@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> +			defstring = defGetString(defel);
> +			if (pg_strcasecmp(defstring, "True") == 0)
> +				d->acceptAll = true;
> +			else if (pg_strcasecmp(defstring, "False") == 0)
> +				d->acceptAll = false;
> +			else
> +				ereport(ERROR,
> +					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> +					 errmsg("invalid value for AcceptAll parameter: \"%s\"",
> +						 	defstring)));

This bit should be replaced with defGetBoolean.  Otherwise it looks
reasonably sane.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Greg Sabino MullaneDate: 2007-11-14 04:38:08
Subject: Better default_statistics_target
Previous:From: Tom LaneDate: 2007-11-14 03:34:37
Subject: Re: Simplifying Text Search

pgsql-patches by date

Next:From: Greg Sabino MullaneDate: 2007-11-14 04:38:08
Subject: Better default_statistics_target
Previous:From: Andrew DunstanDate: 2007-11-14 03:03:40
Subject: Re: [HACKERS] plperl and regexps with accented characters - incompatible?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group