Class ServerInfo


  • public class ServerInfo
    extends Object
    Information about a running Postgres instance.
    Author:
    Horia Chiorean (hchiorea@redhat.com)
    • Constructor Detail

      • ServerInfo

        protected ServerInfo()
    • Method Detail

      • server

        public String server()
        Returns information about the server machine
        Returns:
        a String, possibly null if info was not available
      • username

        public String username()
        Returns the name of the user of a connection
        Returns:
        a String, possibly null if info was not available
      • database

        public String database()
        Returns the name of a database for which a connection was established
        Returns:
        a String, possibly null if info was not available
      • permissionsByRoleName

        public Map<String,​String> permissionsByRoleName()
        Returns information about the role names and permissions of the current user
        Returns:
        a Map of role information, keyed by role name; never null but possibly empty