1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 00:54:08 +02:00

PostgreSQL: Unescape bytea fields

This commit is contained in:
Jakub Vrana
2018-02-06 16:05:39 +01:00
parent 29c127e94a
commit 19653de764
5 changed files with 25 additions and 3 deletions

View File

@@ -40,6 +40,10 @@ if (isset($_GET["pgsql"])) {
return "'" . pg_escape_string($this->_link, $string) . "'";
}
function value($val, $field) {
return ($field["type"] == "bytea" ? pg_unescape_bytea($val) : $val);
}
function quoteBinary($string) {
return "'" . pg_escape_bytea($this->_link, $string) . "'";
}
@@ -151,6 +155,10 @@ if (isset($_GET["pgsql"])) {
return ($adminer->database() == $database);
}
function value($val, $field) {
return $val;
}
function quoteBinary($s) {
return q($s);
}
@@ -196,6 +204,10 @@ if (isset($_GET["pgsql"])) {
);
}
function value($val, $field) {
return $this->_conn->value($val, $field);
}
function quoteBinary($s) {
return $this->_conn->quoteBinary($s);
}