pgsql can also use unix_socket

fix Deprecated: pg_escape_string(): Automatic fetching of PostgreSQL connection
This commit is contained in:
sy-records 2024-03-25 19:35:23 +08:00
parent 20537a0124
commit 45e244ede7
No known key found for this signature in database
GPG Key ID: C3BB4FF13CD72ACE

View File

@ -119,7 +119,7 @@ class Pgsql implements Adapter
/**
* @param resource $resource
* @return array|null
* @return array
*/
public function fetchAll($resource): array
{
@ -146,6 +146,6 @@ class Pgsql implements Adapter
*/
public function quoteValue($string): string
{
return '\'' . pg_escape_string($string) . '\'';
return '\'' . str_replace("'", '"', $string) . '\'';
}
}