4 <?php include "_skipif.inc"; ?>
11 $c = new pq\Connection(PQ_DSN);
13 $c->exec("SET lc_messages TO 'C'");
14 } catch (pq\Exception $e) {
15 // no not fail if we are not superuser
18 $x = new pq\Cancel($c);
20 $c->execAsync("SELECT pg_sleep(10)");
24 var_dump($c === $x->connection);
25 var_dump($c->getResult());
26 printf("%s\n", $c->errorMessage);
32 object(pq\Result)#%d (9) {
36 string(11) "FATAL_ERROR"
38 string(47) "ERROR: canceling statement due to user request"
46 string(39) "canceling statement due to user request"
51 ["statement_position"]=>
53 ["internal_position"]=>
70 string(10) "postgres.c"
74 string(17) "ProcessInterrupts"
87 ERROR: canceling statement due to user request