Package scriptella.driver.postgresql


package scriptella.driver.postgresql
PostgreSQL pgJDBC adapter for Scriptella.

See Overview of JDBC package for a description of common features and connection properties.

See the core database compatibility matrix for the current validation target and status.

General information

Driver class:scriptella.driver.postgresql.Driver
JDBC driver class:org.postgresql.Driver
URL:jdbc:postgresql://host:5432/database
Runtime dependencies: pgJDBC (postgresql-VERSION.jar), supplied through the connection classpath.

Driver Specific Properties

Name Description Required
reWriteBatchedInserts pgJDBC option to combine compatible batched inserts into multi-row INSERT statements. Default: false. Set it to true alongside statement.batchSize for batch insert workloads. No

Batch inserts

For repeated compatible INSERT statements, enable Scriptella batching with statement.batchSize=1000 and set reWriteBatchedInserts=true in the connection body. Scriptella passes connection properties directly to the JDBC driver. This pgJDBC option combines compatible batched inserts into multi-row INSERT statements and can reduce import time. pgJDBC defaults it to false; Scriptella does not enable it automatically.

    <connection id="db" driver="postgresql"
                url="jdbc:postgresql://localhost:5432/test"
                user="username" password="password">
        autocommit=false
        statement.batchSize=1000
        reWriteBatchedInserts=true
    </connection>

The batch size controls statement grouping, not commit frequency. With autocommit=false, batching retains the ETL transaction boundary. Rewriting applies to compatible INSERT batches, not arbitrary SQL; test your workload before enabling it. See the pgJDBC connection parameters and the JDBC batching documentation for details.

See the batching and insert performance guide for batch sizes, driver optimization settings, transaction boundaries, and tuning recommendations.

Examples

    <connection url="jdbc:postgresql://localhost:5432/test" user="username" password="password">
    </connection>
  • Classes
    Class
    Description
    Scriptella Adapter for PostgreSQL database.