mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
PostgreSQL: Upload binary files to bytea fields
This commit is contained in:
@@ -37,7 +37,11 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . pg_escape_string($this->_link, $string) . "'"; //! bytea
|
||||
return "'" . pg_escape_string($this->_link, $string) . "'";
|
||||
}
|
||||
|
||||
function quoteBinary($string) {
|
||||
return "'" . pg_escape_bytea($this->_link, $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -147,6 +151,10 @@ if (isset($_GET["pgsql"])) {
|
||||
return ($adminer->database() == $database);
|
||||
}
|
||||
|
||||
function quoteBinary($s) {
|
||||
return q($s);
|
||||
}
|
||||
|
||||
function warnings() {
|
||||
return ''; // not implemented in PDO_PgSQL as of PHP 7.2.1
|
||||
}
|
||||
@@ -188,6 +196,10 @@ if (isset($_GET["pgsql"])) {
|
||||
);
|
||||
}
|
||||
|
||||
function quoteBinary($s) {
|
||||
return $this->_conn->quoteBinary($s);
|
||||
}
|
||||
|
||||
function warnings() {
|
||||
return $this->_conn->warnings();
|
||||
}
|
||||
|
Reference in New Issue
Block a user