Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0CB639FA33E for ; Tue, 19 Jun 2007 11:08:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 68163-08 for ; Tue, 19 Jun 2007 11:08:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A32599FB588 for ; Tue, 19 Jun 2007 11:08:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5JE8NmG027098; Tue, 19 Jun 2007 10:08:23 -0400 (EDT) To: manchicken cc: pgsql-sql@postgresql.org Subject: Re: tsearch2() trigger and domain types... 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> Comments: In-reply-to manchicken message dated "Tue, 19 Jun 2007 08:55:46 -0500" Date: Tue, 19 Jun 2007 10:08:23 -0400 Message-ID: <27097.1182262103@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/140 X-Sequence-Number: 28630 manchicken 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