1
0
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:
Jakub Vrana
2018-02-06 15:42:14 +01:00
parent b649fb2f3f
commit 17b110f0d5
4 changed files with 24 additions and 3 deletions

View File

@@ -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();
}