Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B20809FB7F4 for ; Tue, 19 Jun 2007 10:56:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 11506-06 for ; Tue, 19 Jun 2007 10:56:33 -0300 (ADT) X-Greylist: delayed 16:46:19.30379 by SQLgrey-1.7.5 Received: from raptor.webhostserver.biz (raptor.webhostserver.biz [208.101.26.91]) by postgresql.org (Postfix) with ESMTP id C9F4E9FB81E for ; Tue, 19 Jun 2007 10:56:39 -0300 (ADT) 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 1I0eCD-0008CR-40 for pgsql-sql@postgresql.org; Tue, 19 Jun 2007 07:56:37 -0600 From: manchicken Organization: notsosoft.net To: pgsql-sql@postgresql.org Subject: Re: tsearch2() trigger and domain types... Date: Tue, 19 Jun 2007 08:55:46 -0500 User-Agent: KMail/1.9.7 References: <200706181610.00270.manchicken@notsosoft.net> <10334.1182207590@sss.pgh.pa.us> In-Reply-To: <10334.1182207590@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706190855.47398.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/139 X-Sequence-Number: 28629 On Monday 18 June 2007 17:59:50 Tom Lane wrote: > "Michael D. Stemle, Jr." writes: > > For standardization in my database I use a domain (login_t) for my login > > column in my profile table. > > > > Well, here's what I get upon every update and insert to the profile > > table: WARNING: TSearch: 'login' is not of character type > > The tsearch trigger seems to insist that the column be text, varchar(n), > or char(n) ... no domains need apply :-( > > I'm not real sure why it doesn't just invoke the column's output > function and be datatype-agnostic. Or at least do that when the > shortcut "I know what text looks like" path isn't applicable. Is there any way to cast these column datatypes in the trigger to fool it, or is the only way to fix this to reconstruct the table without domains? I'd really prefer not to abandon domains if at all possible. -- ~ manchicken <>< (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