Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F2D799FBAE3 for ; Mon, 18 Jun 2007 18:29:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80892-01 for ; Mon, 18 Jun 2007 18:29:00 -0300 (ADT) X-Greylist: delayed 00:18:35.900334 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 4468E9FBB23 for ; Mon, 18 Jun 2007 18:28:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from raptor.webhostserver.biz (raptor.webhostserver.biz [208.101.26.91]) by svr4.postgresql.org (Postfix) with ESMTP id A05D15AF04F for ; Mon, 18 Jun 2007 21:10:20 +0000 (GMT) Received: from 74-134-94-223.dhcp.insightbb.com ([74.134.94.223] helo=[192.168.2.104]) by raptor.webhostserver.biz with esmtp (Exim 4.66) (envelope-from ) id 1I0OUM-0004DF-Cg for pgsql-sql@postgresql.org; Mon, 18 Jun 2007 15:10:18 -0600 From: "Michael D. Stemle, Jr." To: pgsql-sql@postgresql.org Subject: tsearch2() trigger and domain types... Date: Mon, 18 Jun 2007 16:09:59 -0500 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_oSvdG2qUwr3+BSB" Message-Id: <200706181610.00270.manchicken@notsosoft.net> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - raptor.webhostserver.biz X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - notsosoft.net X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/135 X-Sequence-Number: 28625 --Boundary-00=_oSvdG2qUwr3+BSB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Okay, so I have an interesting problem that I'm having a hard time figuring out. For standardization in my database I use a domain (login_t) for my login column in my profile table. I'm trying to use the tsearch2() trigger to index several columns, including the login column, into a column called "search_index." So I added the trigger as attached with the hope that it would do just that. Well, here's what I get upon every update and insert to the profile table: WARNING: TSearch: 'login' is not of character type I've tried casting and such, but nothing seems to work. Anybody got any ideas? Thanks in advance. -- ~ Michael D. Stemle, Jr. <>< (A)bort, (R)etry, (I)nfluence with large hammer 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html --Boundary-00=_oSvdG2qUwr3+BSB Content-Type: text/plain; charset="us-ascii"; name="tgr_profile_search_index-on-public_profile_DDL.sql" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tgr_profile_search_index-on-public_profile_DDL.sql" CREATE TRIGGER "tgr_profile_search_index" AFTER INSERT OR UPDATE ON "public"."profile" FOR EACH ROW EXECUTE PROCEDURE "public"."tsearch2"(search_index, description, interests, login, hometown, email, url, im_names, name); COMMENT ON TRIGGER "tgr_profile_search_index" ON "public"."profile" IS 'This trigger will keep the search index up to date for the profile table. This index is based on the description and the interests columns.'; --Boundary-00=_oSvdG2qUwr3+BSB--