On Tue Jul 19 02:13:20 2016, ZDM wrote:
Show quoted text> Currently I need to prepare same query twice, for async and blocking
> execution separately.
>
> And prepare call is always blocking.
>
> Is it possible to create additional methods:
>
> prepare_async($sql, $async_type, ...) - that will call PQsendPrepare,
>
> execute_async($sql or $sth, $async_type, @bind) - will call
> PQsendQueryPrepared or PQsendQuery;
>
> Where $async_type is PG_OLDQUERY_CANCEL or PG_OLDQUERY_WAIT;
>
> And do not use pg_async attribute at all?
Very unlikely - that would stomp all over the DBI namespace, for one thing. Best we could do is pg_prepare_async, but that seems overkill when that's what attributes are for. :)