[GENERAL] Fulltext Search Function

2012-07-11 Thread Jeremaine Johnson
Hi, I am new to Postgres and I've been able to get the full text search working, (at least running searches in PGAdmin) my problem is, I would like to pass in a search text from my online application as an input parameter into a function in Postgres that would do a search on my table and not

[GENERAL] Fulltext Search Function

2012-07-11 Thread Jeremaine Johnson
Hi, I have a full text search query (below) which works fine but would like to write a function which will make use of this query passing in two parameters, any ideas please? SELECT name, description, ts_rank_cd(textsearchable_index_col, query, 32 /* rank/(rank+1) */) AS rank FROM compa