pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael D. Stemle, Jr. <manchicken@notsosoft.net>
To: pgsql-sql@postgresql.org
Subject: tsearch2() trigger and domain types...
Date: Mon, 18 Jun 2007 16:09:59 -0500
Message-ID: <200706181610.00270.manchicken@notsosoft.net> (raw)

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

Attachments:

tgr_profile_search_index-on-public_profile_DDL.sql (text/plain, 439B) download 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.';

view thread (5+ messages)  latest in thread

Message-ID: <200706181610.00270.manchicken@notsosoft.net>
Permalink:  ../200706181610.00270.manchicken@notsosoft.net/
Also on:    postgresql.org/message-id/200706181610.00270.manchicken@notsosoft.net

 · 

reply

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: manchicken@notsosoft.net
  Subject: Re: tsearch2() trigger and domain types...
  In-Reply-To: <200706181610.00270.manchicken@notsosoft.net>

* 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