From: | pg(at)slatech(dot)com |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | joins with text search |
Date: | 2010-09-08 02:42:53 |
Message-ID: | alpine.BSF.2.00.1009071707490.81227@gozaimasu.pair.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hi-
supposing i have the following table structure:
vendors
- id int
- name varchar
products
- product_list_id int
- vendor_id int references vendors
- part_number varchar
- description varchar
- price
- textsearch
how can i execute some type of join and get the name of the vendor to be
included in the textsearch column of the products table?
i am currently populating the textsearch column with the following
command:
UPDATE
products
SET
textsearch=setweight(to_tsvector('english', description), 'A') ||
setweight(to_tsvector('english', part_number, 'B')
WHERE
product_list_id=3
Is there a way I can join products.vendor_id with vendors.id and get the
vendor.name in the textsearch column as well?
Thanks,
Clark
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2010-09-08 04:06:32 | pgfoundry news section |
Previous Message | Brendan Hill | 2010-09-08 01:31:47 | Postgres 32bit on Windows 64bit, related components |