-
Hi everyone, first time poster - long time lurker. I want to submit to my postgres db a long running query that generates a new table for reading later. According to PG docs, a command can be submitted to the server without waiting for the result via Does pg-promise support this? In summary, can I use pg-promise to:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This library supports only what the underlying driver does. To my knowledge, there is no such thing as async execution, as the driver requires that only one query can be executed at a time against the same connection, so you would have to wait. You can, of course, execute a query and simply not wait for the result, but that's different, because you still won't be able to execute another one, till it finishes. There have been some discussions around it in the driver: |
Beta Was this translation helpful? Give feedback.
This library supports only what the underlying driver does.
To my knowledge, there is no such thing as async execution, as the driver requires that only one query can be executed at a time against the same connection, so you would have to wait. You can, of course, execute a query and simply not wait for the result, but that's different, because you still won't be able to execute another one, till it finishes.
There have been some discussions around it in the driver: