Re: [GENERAL] [pg_trgm] Per-query set_limit()

2016-06-03 Thread Artur Zakirov
Unfortunately, there is not a better way. You should manually set it if you want different limit. On 03.06.2016 13:43, Greg Navis wrote: Hey! I'd like to call `set_limit` on a per-query basis, i.e. searching for restaurants in a given city should use 0.4 and searching for cinemas by name shoul

[GENERAL] [pg_trgm] Per-query set_limit()

2016-06-03 Thread Greg Navis
Hey! I'd like to call `set_limit` on a per-query basis, i.e. searching for restaurants in a given city should use 0.4 and searching for cinemas by name should use 0.2. I can accomplish this with: ``` SELECT set_limit(0.2); SELECT * FROM cinemas WHERE name % ?; ``` (similarly for restaurants). M