Re: tsearch2() trigger and domain types...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: manchicken <manchicken(at)notsosoft(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2() trigger and domain types...
Date: 2007-06-19 14:08:23
Message-ID: 27097.1182262103@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

manchicken <manchicken(at)notsosoft(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ranieri Mazili 2007-06-19 14:59:05 Re: Subquery problems
Previous Message manchicken 2007-06-19 13:55:46 Re: tsearch2() trigger and domain types...