| @@ 727-730 (lines=4) @@ | ||
| 724 | { |
|
| 725 | $user = 'USER_NAME()'; |
|
| 726 | ||
| 727 | if (strpos($table, '.') !== false) { |
|
| 728 | list($user, $table) = explode('.', $table); |
|
| 729 | $user = $this->quoteStringLiteral($user); |
|
| 730 | } |
|
| 731 | ||
| 732 | return "SELECT col.column_name, |
|
| 733 | COALESCE(def.user_type_name, def.domain_name) AS 'type', |
|
| @@ 368-373 (lines=6) @@ | ||
| 365 | private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias = 'n') |
|
| 366 | { |
|
| 367 | $whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND "; |
|
| 368 | if (strpos($table, ".") !== false) { |
|
| 369 | list($schema, $table) = explode(".", $table); |
|
| 370 | $schema = $this->quoteStringLiteral($schema); |
|
| 371 | } else { |
|
| 372 | $schema = "ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),','))"; |
|
| 373 | } |
|
| 374 | ||
| 375 | $table = new Identifier($table); |
|
| 376 | $table = $this->quoteStringLiteral($table->getName()); |
|