diff --git a/source/dbconnection.pas b/source/dbconnection.pas index ce94e1b9..be33e6c1 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -2898,10 +2898,7 @@ begin Result := inherited; if not Assigned(Result) then begin try - FAllDatabases := GetCol('SELECT '+QuoteIdent('catalog_name')+ // Use "schema" when using schemata - ' FROM '+QuoteIdent('information_schema')+'.'+QuoteIdent('schemata')+ - ' GROUP BY '+QuoteIdent('catalog_name') - ); + FAllDatabases := GetCol('SELECT datname FROM pg_database WHERE datistemplate=FALSE'); except on E:EDatabaseError do FAllDatabases := TStringList.Create; end;