mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Updating to Limesurvey 1.9.1+ revision 11132 (part one)
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
Set tabs to 8.
|
||||
|
||||
*/
|
||||
|
||||
if (!defined('ADODB_DIR')) die();
|
||||
class ADODB_pdo_pgsql extends ADODB_pdo {
|
||||
var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
|
||||
var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
|
||||
and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
|
||||
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
|
||||
union
|
||||
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
|
||||
union
|
||||
select viewname,'V' from pg_views where viewname not like 'pg\_%'";
|
||||
//"select tablename from pg_tables where tablename not like 'pg_%' order by 1";
|
||||
var $isoDates = true; // accepts dates in ISO format
|
||||
@@ -22,16 +22,16 @@ class ADODB_pdo_pgsql extends ADODB_pdo {
|
||||
var $sysTimeStamp = "CURRENT_TIMESTAMP";
|
||||
var $blobEncodeType = 'C';
|
||||
var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum
|
||||
FROM pg_class c, pg_attribute a,pg_type t
|
||||
FROM pg_class c, pg_attribute a,pg_type t
|
||||
WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
|
||||
AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
|
||||
|
||||
// used when schema defined
|
||||
var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum
|
||||
FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n
|
||||
FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n
|
||||
WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
|
||||
and c.relnamespace=n.oid and n.nspname='%s'
|
||||
and a.attname not like '....%%' AND a.attnum > 0
|
||||
and c.relnamespace=n.oid and n.nspname='%s'
|
||||
and a.attname not like '....%%' AND a.attnum > 0
|
||||
AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
|
||||
|
||||
// get primary key etc -- from Freek Dijkstra
|
||||
@@ -87,7 +87,7 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
|
||||
if ($info['version'] >= 7.3) {
|
||||
$this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
|
||||
and schemaname not in ( 'pg_catalog','information_schema')
|
||||
union
|
||||
union
|
||||
select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') ";
|
||||
}
|
||||
if ($mask) {
|
||||
@@ -95,13 +95,13 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
|
||||
$mask = $this->qstr(strtolower($mask));
|
||||
if ($info['version']>=7.3)
|
||||
$this->metaTablesSQL = "
|
||||
select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')
|
||||
union
|
||||
select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')
|
||||
union
|
||||
select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') ";
|
||||
else
|
||||
$this->metaTablesSQL = "
|
||||
select tablename,'T' from pg_tables where tablename like $mask
|
||||
union
|
||||
select tablename,'T' from pg_tables where tablename like $mask
|
||||
union
|
||||
select viewname,'V' from pg_views where viewname like $mask";
|
||||
}
|
||||
$ret = ADOConnection::MetaTables($ttype,$showSchema);
|
||||
|
||||
Reference in New Issue
Block a user