mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix query for getting database names on PostgreSQL
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user