Class PostgreSQLDatabase

java.lang.Object
org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
org.flywaydb.database.postgresql.PostgreSQLDatabase
All Implemented Interfaces:
Closeable, AutoCloseable

public class PostgreSQLDatabase extends org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
  • Field Summary

    Fields inherited from class org.flywaydb.core.internal.database.base.Database

    configuration, databaseType, jdbcConnectionFactory, jdbcMetaData, jdbcTemplate, rawMainJdbcConnection, statementInterceptor
  • Constructor Summary

    Constructors
    Constructor
    Description
    PostgreSQLDatabase(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.jdbc.JdbcConnectionFactory jdbcConnectionFactory, org.flywaydb.core.internal.jdbc.StatementInterceptor statementInterceptor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    protected String
     
    doQuote(String identifier)
     
    void
    ensureSupported(org.flywaydb.core.api.configuration.Configuration configuration)
     
     
     
     
    getRawCreateScript(org.flywaydb.core.internal.database.base.Table table, boolean baseline)
     
    getSelectStatement(org.flywaydb.core.internal.database.base.Table table)
    This exists to fix this issue: https://github.com/flyway/flyway/issues/2638 See https://www.pgpool.net/docs/latest/en/html/runtime-config-load-balancing.html
    boolean
     
    boolean
     

    Methods inherited from class org.flywaydb.core.internal.database.base.Database

    cleanPostSchemas, cleanPreSchemas, close, computeVersionDisplayName, determineVersion, disposeEventConnection, doCleanPostSchemas, doCleanPreSchemas, doGetCatalog, ensureDatabaseIsRecentEnough, ensureDatabaseNotOlderThanOtherwiseRecommendUpgradeToFlywayEdition, getAllSchemas, getBaselineStatement, getCatalog, getCloseQuote, getConfiguration, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getDeleteStatement, getEventConnection, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getOpenQuote, getUpdateStatement, getVersion, hasEventConnection, notifyDatabaseIsNotFormallySupported, quote, recommendFlywayUpgradeIfNecessary, recommendFlywayUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PostgreSQLDatabase

      public PostgreSQLDatabase(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.jdbc.JdbcConnectionFactory jdbcConnectionFactory, org.flywaydb.core.internal.jdbc.StatementInterceptor statementInterceptor)
  • Method Details

    • doGetConnection

      protected PostgreSQLConnection doGetConnection(Connection connection)
      Specified by:
      doGetConnection in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • ensureSupported

      public void ensureSupported(org.flywaydb.core.api.configuration.Configuration configuration)
      Specified by:
      ensureSupported in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • getRawCreateScript

      public String getRawCreateScript(org.flywaydb.core.internal.database.base.Table table, boolean baseline)
      Specified by:
      getRawCreateScript in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • doGetCurrentUser

      protected String doGetCurrentUser() throws SQLException
      Overrides:
      doGetCurrentUser in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
      Throws:
      SQLException
    • supportsDdlTransactions

      public boolean supportsDdlTransactions()
      Specified by:
      supportsDdlTransactions in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • getBooleanTrue

      public String getBooleanTrue()
      Specified by:
      getBooleanTrue in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • getBooleanFalse

      public String getBooleanFalse()
      Specified by:
      getBooleanFalse in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • doQuote

      public String doQuote(String identifier)
      Overrides:
      doQuote in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • getEscapedQuote

      public String getEscapedQuote()
      Overrides:
      getEscapedQuote in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • catalogIsSchema

      public boolean catalogIsSchema()
      Specified by:
      catalogIsSchema in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • useSingleConnection

      public boolean useSingleConnection()
      Overrides:
      useSingleConnection in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>
    • getSelectStatement

      public String getSelectStatement(org.flywaydb.core.internal.database.base.Table table)
      This exists to fix this issue: https://github.com/flyway/flyway/issues/2638 See https://www.pgpool.net/docs/latest/en/html/runtime-config-load-balancing.html
      Overrides:
      getSelectStatement in class org.flywaydb.core.internal.database.base.Database<PostgreSQLConnection>