From: Tom Lane <tgl@sss.pgh.pa.us>
To: manchicken <manchicken@notsosoft.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: tsearch2() trigger and domain types...
Date: Tue, 19 Jun 2007 10:08:23 -0400
Message-ID: <27097.1182262103@sss.pgh.pa.us> (raw)
In-Reply-To: <200706190855.47398.manchicken@notsosoft.net>
References: <200706181610.00270.manchicken@notsosoft.net>
<10334.1182207590@sss.pgh.pa.us>
<200706190855.47398.manchicken@notsosoft.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, manchicken@notsosoft.net
Subject: Re: tsearch2() trigger and domain types...
In-Reply-To: <27097.1182262103@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox