Package org.postgresql.jdbcurlresolver

# Class PgPassParser

java.lang.Object
org.postgresql.jdbcurlresolver.PgPassParser

public class PgPassParser extends Object
helps to read Password File. https://www.postgresql.org/docs/current/libpq-pgpass.html

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static @Nullable String`
  `getPassword(@Nullable String hostname, @Nullable String port, @Nullable String database, @Nullable String user)`
  Read .pgpass resource

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

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

- ## Method Details

  - ### getPassword

    public static @Nullable String getPassword(@Nullable String hostname, @Nullable String port, @Nullable String database, @Nullable String user)
    Read .pgpass resource
    Parameters:
      `hostname` - hostname or *
      `port` - port or *
      `database` - database or *
      `user` - username or *
    Returns:
      password or null