Re: NEW + tableOID

From: Ricardo Bayley <ricardo(dot)bayley(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: NEW + tableOID
Date: 2010-08-13 21:33:01
Message-ID: AANLkTi=HjHitHDYAj2oKUgYd_4pJaBsQ+QyQBUBu5aPv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

By the way,

Another option to do this, is to do some table Inheritance. So Full Text
Search is perform on each table.

So which scenario is better ? Triggers which insert data into a third table,
or Inheritance ?

Thanks in advanced !

Ricardo.

On Fri, Aug 13, 2010 at 6:08 PM, Ricardo Bayley <ricardo(dot)bayley(at)gmail(dot)com>wrote:

> Hi Fellows,
>
> I have a bunch of tables which I need to perform a Full Text Search.
> The approach I am using is to insert into another table (the searcheable
> table): tsvector information, tableOID and the record Id
>
> I do this with triggers. This issue I have is that the tableoid data cannot
> be used with the NEW keyword. I always get value 0 instead of the actual
> tableoid.
>
> Insert statement looks something like this:
> INSERT INTO fts.fdata(tbl_oid, id, vector_info)
> VALUES (NEW.tableoid, NEW.id, NEW.vector_info)
>
> So how can I get the tableoid in a trigger function ?
>
>
> regards,
>
>
> Ricardo
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-08-13 21:45:05 Re: NEW + tableOID
Previous Message Ricardo Bayley 2010-08-13 21:08:15 NEW + tableOID