Package org.postgresql.util

# Class PGPropertyUtil

java.lang.Object
org.postgresql.util.PGPropertyUtil

public class PGPropertyUtil extends Object
routines to support PG properties

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PGPropertyUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `propertiesConsistencyCheck(Properties properties)`
  Validate properties.
  `static String`
  `translatePGPropertyToPGService(String propertyKey)`
  translate PGSERVICEFILE keys host, port, dbname Example: "PGHOST" becomes "host"
  `static String`
  `translatePGServiceToPGProperty(String serviceKey)`
  translate PGSERVICEFILE keys host, port, dbname Example: "host" becomes "PGHOST"

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PGPropertyUtil

    public PGPropertyUtil()

- ## Method Details

  - ### propertiesConsistencyCheck

    public static boolean propertiesConsistencyCheck(Properties properties)
    Validate properties. Goal is to detect inconsistencies and report understandable messages
    Parameters:
      `properties` - properties
    Returns:
      false if errors found

  - ### translatePGServiceToPGProperty

    public static String translatePGServiceToPGProperty(String serviceKey)
    translate PGSERVICEFILE keys host, port, dbname Example: "host" becomes "PGHOST"
    Parameters:
      `serviceKey` - key in pg_service.conf
    Returns:
      translated property or the same value if translation is not needed

  - ### translatePGPropertyToPGService

    public static String translatePGPropertyToPGService(String propertyKey)
    translate PGSERVICEFILE keys host, port, dbname Example: "PGHOST" becomes "host"
    Parameters:
      `propertyKey` - postgres property
    Returns:
      translated property or the same value if translation is not needed