Re: tsearch consistency trigger on inheritated table - Mailing list pgsql-general

From Tom Lane
Subject Re: tsearch consistency trigger on inheritated table
Date
Msg-id 23681.1037209818@sss.pgh.pa.us
Whole thread Raw
In response to Re: tsearch consistency trigger on inheritated table  (Björn Metzdorf <bm@turtle-entertainment.de>)
List pgsql-general
=?Windows-1252?Q?Bj=F6rn_Metzdorf?= <bm@turtle-entertainment.de> writes:
> --- txtidx.c-orig       Wed Nov 13 17:15:57 2002
> +++ txtidx.c    Wed Nov 13 17:33:15 2002
> @@ -554,7 +554,7 @@

>                 numattr =3D SPI_fnumber(rel->rd_att, trigger->tgargs[i]);
>                 oidtype =3D SPI_gettypeid(rel->rd_att, numattr);
> -               if (numattr < 0 || (!(oidtype =3D=3D TEXTOID || oidtype =3D=
> =3D VARCHAROID)))
> +               if (numattr < 0 || (!(oidtype =3D=3D TEXTOID || oidtype =3D=
> =3D VARCHAROID || oidtype =3D=3D BPCHAROID)))
>                 {
>                         elog(NOTICE, "TSearch: can not find field '%s'", tr=
> igger->tgargs[i]);
>                         continue;

It would probably be better to have two different error messages for
the "field not found" and "field not right type" cases.

BTW, "character(100)" screams "lots of wasted space" to me.  Why aren't
you using varchar, anyway?

            regards, tom lane

pgsql-general by date:

Previous
From: "Williams, Travis L, NPONS"
Date:
Subject: readline help
Next
From: "scott.marlowe"
Date:
Subject: Re: Connection startup overhead