We have a query we want to run with pg-promise, but we want to cancel it if it takes to long to run. Is there a method in PGP to do this?
Edit:
I understand this is usually considered a hack, however I want to fetch roughly 100,000 rows out of 100 million or so. Those queries can take a long time, and sadly by the time we would fetch them just letting the query run(3-4 minutes) the data is considered outdated. We want to avoid that. since this is an insert heavy table and we are just reading it, letting a long read run is fine(would only cause an issue if we do an update or delete, which we don't often on this table).