How to set postgres query execution timeout from application level? How to set postgres query execution timeout from application level? laravel laravel

How to set postgres query execution timeout from application level?


Simply send the following statement:

set statement_timeout TO 100;

Postgresql will then cancel all queries exceeding 100ms.