Skip to content
Permalink
Browse files

Issue #802: Redshift: modify query for retrieving accessible database…

  • Loading branch information
ansgarbecker committed Nov 12, 2019
1 parent 98b75c4 commit fe7e402782f1d705b2f696ac9451218666726e5a
Showing with 1 addition and 0 deletions.
  1. +1 −0 source/dbconnection.pas
@@ -3620,6 +3620,7 @@ function TPGConnection.GetAllDatabases: TStringList;
//FAllDatabases := GetCol('SELECT datname FROM pg_database WHERE datistemplate=FALSE');
FAllDatabases := GetCol('SELECT '+QuoteIdent('nspname')+
' FROM '+QuoteIdent('pg_catalog')+'.'+QuoteIdent('pg_namespace')+
' WHERE '+QuoteIdent('nspowner')+' != 1 OR '+QuoteIdent('nspname')+' IN ('+EscapeString('pg_catalog')+', '+EscapeString('information_schema')+')'+
' ORDER BY '+QuoteIdent('nspname'));
except on E:EDbError do
FAllDatabases := TStringList.Create;

0 comments on commit fe7e402

Please sign in to comment.
You can’t perform that action at this time.