Re: tsearch2() trigger and domain types... - Mailing list pgsql-sql

From Tom Lane
Subject Re: tsearch2() trigger and domain types...
Date
Msg-id 27097.1182262103@sss.pgh.pa.us
Whole thread Raw
In response to Re: tsearch2() trigger and domain types...  (manchicken <manchicken@notsosoft.net>)
Responses Re: tsearch2() trigger and domain types...  (manchicken <manchicken@notsosoft.net>)
List pgsql-sql
manchicken <manchicken@notsosoft.net> writes:
> Is there any way to cast these column datatypes in the trigger to fool it,

No, you'd have to modify the trigger source code.  It'd be a pretty
trivial change to allow domains over textual types:
        continue;    }    oidtype = SPI_gettypeid(rel->rd_att, numattr);
+        oidtype = getBaseType(oidtype);    /* We assume char() and varchar() are binary-equivalent to text */    if
(!(oidtype== TEXTOID ||          oidtype == VARCHAROID ||          oidtype == BPCHAROID))    {        elog(WARNING,
"TSearch:'%s' is not of character type",             trigger->tgargs[i]);
 

        regards, tom lane


pgsql-sql by date:

Previous
From: manchicken
Date:
Subject: Re: tsearch2() trigger and domain types...
Next
From: Ranieri Mazili
Date:
Subject: Re: [GENERAL] Subquery problems