|
|
@ -242,7 +242,6 @@ SQL; |
|
|
|
$schemaName = $this->db->quoteValue($table->schemaName); |
|
|
|
$schemaName = $this->db->quoteValue($table->schemaName); |
|
|
|
$sql = <<<SQL |
|
|
|
$sql = <<<SQL |
|
|
|
SELECT |
|
|
|
SELECT |
|
|
|
current_database() as table_catalog, |
|
|
|
|
|
|
|
d.nspname AS table_schema, |
|
|
|
d.nspname AS table_schema, |
|
|
|
c.relname AS table_name, |
|
|
|
c.relname AS table_name, |
|
|
|
a.attname AS column_name, |
|
|
|
a.attname AS column_name, |
|
|
@ -289,7 +288,7 @@ FROM |
|
|
|
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace |
|
|
|
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace |
|
|
|
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p' |
|
|
|
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p' |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
a.attnum > 0 |
|
|
|
a.attnum > 0 and t.typename != '' |
|
|
|
and c.relname = {$tableName} |
|
|
|
and c.relname = {$tableName} |
|
|
|
and d.nspname = {$schemaName} |
|
|
|
and d.nspname = {$schemaName} |
|
|
|
ORDER BY |
|
|
|
ORDER BY |
|
|
|