Search Postgresql Archives

joins with text search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux