1
0
mirror of https://github.com/danog/postgres.git synced 2024-11-30 04:29:12 +01:00

Use DISCARD ALL instead of RESET ALL

Closes #34.
This commit is contained in:
Aaron Piotrowski 2020-08-11 10:49:51 -05:00
parent 7cf9d37033
commit b027714d02
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -29,7 +29,7 @@ final class Pool extends ConnectionPool implements Link
* @param ConnectionConfig $config
* @param int $maxConnections
* @param int $idleTimeout
* @param bool $resetConnections True to automatically execute RESET ALL on a connection before use.
* @param bool $resetConnections True to automatically execute DISCARD ALL on a connection before use.
* @param Connector|null $connector
*/
public function __construct(
@ -80,7 +80,7 @@ final class Pool extends ConnectionPool implements Link
\assert($connection instanceof Connection);
if ($this->resetConnections) {
yield $connection->query("RESET ALL");
yield $connection->query("DISCARD ALL");
}
return $connection;