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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user