PostgreSQL: Support JSON and JSONB data types (bug #542)
This commit is contained in:
parent
88803c6d0e
commit
504c56216c
|
@ -186,12 +186,20 @@ if (isset($_GET["pgsql"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function connect() {
|
function connect() {
|
||||||
global $adminer;
|
global $adminer, $types, $structured_types;
|
||||||
$connection = new Min_DB;
|
$connection = new Min_DB;
|
||||||
$credentials = $adminer->credentials();
|
$credentials = $adminer->credentials();
|
||||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||||
if ($connection->server_info >= 9) {
|
if ($connection->server_info >= 9) {
|
||||||
$connection->query("SET application_name = 'Adminer'");
|
$connection->query("SET application_name = 'Adminer'");
|
||||||
|
if ($connection->server_info >= 9.2) {
|
||||||
|
$structured_types[lang('Strings')][] = "json";
|
||||||
|
$types["json"] = 4294967295;
|
||||||
|
if ($connection->server_info >= 9.2) {
|
||||||
|
$structured_types[lang('Strings')][] = "jsonb";
|
||||||
|
$types["jsonb"] = 4294967295;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $connection;
|
return $connection;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Adminer 4.3.1-dev:
|
Adminer 4.3.1-dev:
|
||||||
PostgreSQL: Fix index size computation in PostgreSQL < 9.0 (regression from 4.3.0)
|
PostgreSQL: Fix index size computation in PostgreSQL < 9.0 (regression from 4.3.0)
|
||||||
PostgreSQL: Fix nullable fields in export
|
PostgreSQL: Fix nullable fields in export
|
||||||
|
PostgreSQL: Support JSON and JSONB data types
|
||||||
|
|
||||||
Adminer 4.3.0 (released 2017-03-15):
|
Adminer 4.3.0 (released 2017-03-15):
|
||||||
Make maxlength in edit fields a soft limit
|
Make maxlength in edit fields a soft limit
|
||||||
|
|
Loading…
Reference in a new issue