From: Nicolas Boisselier Date: Mon, 7 Oct 2024 10:44:39 +0000 (+0100) Subject: fix databases X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=bd8d8a0fbfd957390dbe6390cb33160e3f45e9a3;p=nb.git fix databases --- diff --git a/lib/php/db/types/pgsql.php b/lib/php/db/types/pgsql.php index d0bb9b7c..b49b3f03 100644 --- a/lib/php/db/types/pgsql.php +++ b/lib/php/db/types/pgsql.php @@ -24,9 +24,9 @@ $DB_TYPES['pgsql'] = array ( 'localFile' => array (getenv('HOME').'/.pgpass','^[^:]+:[^:]+::(?P[^:]+):(?[^:]+)'), -'databases' => 'SELECT datname as name,pg_catalog.pg_get_userbyid(datdba) as owner,pg_catalog.pg_encoding_encoding) as encoding, datcollate as "collate",datctype as "Ctype" FROM pg_catalog.pg_database', +'databases' => 'SELECT datname as name,pg_catalog.pg_get_userbyid(datdba) as owner,pg_catalog.pg_encoding_to_char(encoding) as encoding, datcollate as "collate",datctype as "Ctype" FROM pg_catalog.pg_database', +# NB 07.10.24 BUG 'databases' => 'SELECT datname as name,pg_catalog.pg_get_userbyid(datdba) as owner,pg_catalog.pg_encoding_encoding) as encoding, datcollate as "collate",datctype as "Ctype" FROM pg_catalog.pg_database', -# NB 10.01.18 'tables' => "SELECT table_name as name,LOWER(CASE table_type WHEN 'BASE TABLE' THEN 'TABLE' ELSE table_type END) as type,table_type FROM information_schema.tables WHERE table_type in('BASE TABLE','VIEW') AND table_schema = 'public'", 'tables' => "SELECT table_name as name,LOWER(CASE table_type WHEN 'BASE TABLE' THEN 'TABLE' ELSE table_type END) as type FROM information_schema.tables WHERE table_type in('BASE TABLE','VIEW') AND table_schema = 'public'", 'table.sql.create' => function($sql) {