Get All Schemas for a Database in Postgres

Get All Schemas for a Database in Postgres

Hi,

I use the code below to get all Database for Postgres :

     //---- Effacement
     Database.Clear;

     //---- Création de la base de données
     TC := TUniConnection.Create(Self);

     try
        //---- PostgreSQL
        if not (Port.IsNullT or Server.IsNullT or UserName.IsNullT or (Password.Text = '')) then
        begin
             TC.ProviderName                              := 'PostgreSQL';
             TC.UserName                                  := UserName.Text;
             TC.Password                                  := Password.Text;
             TC.server                                    := Server.Text;
             TC.port                                      := Port.IntegerOf;
             TC.SpecificOptions.Values['ApplicationName'] := 'MICROSAT 4';
             if Schema.Text <> '' then
                TC.SpecificOptions.Values['Schema']       := Schema.Text;
        end;

        try
           try
              //---- Ouverture de la connexion
              TC.Open;

              try
                 //---- Sauvegarde la valeur
                 Dt := Database.Text;

                 //---- Remplissage de la structure
                 TC.GetDatabaseNames(Database.Items);

              except on E: Exception do
              end;

           except on E: Exception do
           end;

        finally
               TC.Close; //---- Fermeture de la connexion
        end;

     finally
            FreeAndNil(TC); //---- Libération de la mémoire
     end;

Is there a similiar way to get for a database all schemas ?

Regards,