Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
e3bf698e
Commit
e3bf698e
authored
Oct 23, 2014
by
Steve Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only introspect namespaces and views accessible
parent
3ffc2e45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+15
-8
No files found.
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
e3bf698e
...
@@ -235,7 +235,10 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -235,7 +235,10 @@ class PostgreSqlPlatform extends AbstractPlatform
*/
*/
public
function
getListNamespacesSQL
()
public
function
getListNamespacesSQL
()
{
{
return
"SELECT nspname FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema'"
;
return
"SELECT schema_name AS nspname
FROM information_schema.schemata
WHERE schema_name NOT LIKE 'pg_%'
AND schema_name != 'information_schema'"
;
}
}
/**
/**
...
@@ -243,10 +246,10 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -243,10 +246,10 @@ class PostgreSqlPlatform extends AbstractPlatform
*/
*/
public
function
getListSequencesSQL
(
$database
)
public
function
getListSequencesSQL
(
$database
)
{
{
return
"SELECT sequence_name AS relname,
return
"SELECT sequence_name AS relname,
sequence_schema AS schemaname
sequence_schema AS schemaname
FROM information_schema.sequences
FROM information_schema.sequences
WHERE sequence_schema NOT LIKE 'pg_%'
WHERE sequence_schema NOT LIKE 'pg_%'
AND sequence_schema != 'information_schema'"
;
AND sequence_schema != 'information_schema'"
;
}
}
...
@@ -255,12 +258,12 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -255,12 +258,12 @@ class PostgreSqlPlatform extends AbstractPlatform
*/
*/
public
function
getListTablesSQL
()
public
function
getListTablesSQL
()
{
{
return
"SELECT quote_ident(table_name) AS table_name,
return
"SELECT quote_ident(table_name) AS table_name,
table_schema AS schema_name
table_schema AS schema_name
FROM information_schema.tables
FROM information_schema.tables
WHERE table_schema NOT LIKE 'pg_%'
WHERE table_schema NOT LIKE 'pg_%'
AND table_schema != 'information_schema'
AND table_schema != 'information_schema'
AND table_name != 'geometry_columns'
AND table_name != 'geometry_columns'
AND table_name != 'spatial_ref_sys'"
;
AND table_name != 'spatial_ref_sys'"
;
}
}
...
@@ -269,7 +272,11 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -269,7 +272,11 @@ class PostgreSqlPlatform extends AbstractPlatform
*/
*/
public
function
getListViewsSQL
(
$database
)
public
function
getListViewsSQL
(
$database
)
{
{
return
'SELECT quote_ident(viewname) as viewname, schemaname, definition FROM pg_views'
;
return
'SELECT quote_ident(table_name) AS viewname,
table_schema AS schemaname,
view_definition AS definition
FROM information_schema.views
WHERE view_definition IS NOT NULL'
;
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment