abgtemp
asked on
Search all columns in Postgresql table
I am looking for a way to allow a user from a web front end to query all columns in a postgresql table for multiple values. So if had a tabled named Orders that has columns "id, date, customer, product".
I would like allow the user to be able to search for all entries in the table where the customer Bill ordered lamps by passing a search value of "Bill + Lamps" or something similar to this.
I'm thinking I will need to setup full-text search, but I wasn't sure if this is the case and how to set it up.
I would like allow the user to be able to search for all entries in the table where the customer Bill ordered lamps by passing a search value of "Bill + Lamps" or something similar to this.
I'm thinking I will need to setup full-text search, but I wasn't sure if this is the case and how to set it up.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure what your table structure might look like, but I am guessing that you have more than one table? If so, you will need to write a "view" script for every possible relationship between the tables. This may be a big and time-consuming task. Whether you choose to use a pre-existing service like Google or invent your own search with full-text searching will largely be decided by how much time and budget you have available. Google will likely be faster and less expensive.