Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenonedisc
typelist
printabletrue

...

FAQs for the PostgreSQL JDBC Driver Upgrade

What is happening?

We have upgraded the JDBC driver for the PostgreSQL Snap Pack from v9.4.1207 to v42.7.2 (Java 8). This upgrade will be part of the GA release on August 14, 2024 (Stable release). As a part of this upgrade, the 42.7.2 JDBC driver is bundled with the PostgreSQL Snap Pack as the default JDBC driver.

Why are we upgrading the PostgreSQL driver?

To improve security, performance, stability, and reliability.

What is the timeline for this upgrade?

This upgrade is now available with the Snap Pack version 4postgresupgrade26570 437patches27172 for PostgreSQL and can be manually selected if you want to do early testing before the Latest July release (available on July 10, 2024). This driver upgrade will be part of the GA release on August 14, 2024 (Stable release).

Will I be impacted?

Yes, you will be impacted if you use the default version. The impact might be minimal if you use the latest driver or a higher version than the v42.7.2 (Java 8) JDBC driver.

  • To check the version of the current JAR file that you are using, refer to PostgreSQL's latest versions.

  • To know verify the JAR file that is in use, follow these steps:

    1. Open the JAR file using either a ZIP utility or a JAR viewer tool.

    2. Look for the META-INF/MANIFEST.MF file in the JAR and check the version.

You will not be impacted if If you provide your own custom driver you will not be impacted. 

Do I need to reconfigure my accounts or drivers?

No, you do not have to reconfigure your account settings or drivers; the account can remain as-is to work with the latest driver. However, if you currently use the default version and want to revert to the previous version behavior, we recommend you use the postgres 9.4.1207.jar.

We recommend you investigate your pipelines and check the Snaps downstream of the PostgreSQL snaps Snaps for any of the affected scenarios. Update any dependencies that the downstream Snaps might have with respect to the changing error and outputs (especially in expressions) to conform to the new expected errors and outputs. Learn more about the change in errors and outputs for the new (v42.7.2) JDBC driver.

How can I verify that the changes work?

In a production Org

  1. If you have a production Org to validate connections to your PostgreSQL instances, you may upload a PostgreSQL JDBC driver JAR compatible with the postgres 9.4.1207.jar.

  2. Upload that JAR file to your Org’s shared folder and specify it in the PostgreSQL Account.

  3. Validate the account.

  4. After you verify that the updated JDBC driver works, you may remove it.

How do you override the behavior changes?

Use the postgres 9.4.1207.jar from v9.4.1207 to maintain the same behavior as before the driver upgrade.

Behavior Changes for the PostgreSQL JDBC Driver Upgrade

  • Changes in the query in the error messages:

    • Some error messages will now include the data type for certain specific values, for example:

      • Old: "...where (badId = 1) was aborted:..."

      • New: "...where (badId = ('1'::numeric)) was aborted:..."

  • Improvisations in error messages:

    There are some minor text changes to

    Improvements in text for few of the error messages, for example:

    • Old"Hint: No operator matches the given name and argument types."

    • New"Hint: No operator matches the given name and argument type(s)."

The following table lists the additional behavior changes in the Snap Pack:

PostgreSQL Snaps

Scenario

Error/Output from the old

(

JDBC Driver v9.4.1207

) JDBC Driver

Error/Output from the new

(

JDBC Driver v42.7.2 (Java 8

)

)

JDBC Driver

PostgreSQL-Execute

When you provide multiple statements in the SQL Statement field, the Snap fails.

Status: 0

Output message: Success

Status: -3

Error message: Batch operation failed

PostgreSQL-Select

PostgreSQL-Lookup

PostgreSQL-Execute

Table columns of the Array type now output the data as a list instead of a string.

Output as a string:

{array_col_value={a, b, c}} 

Output message is now in an array:

{array_col_value=[a, b, c]}

PostgreSQL-Delete

PostgreSQL-Execute

PostgreSQL-Insert

PostgreSQL-Update

The various invalid SQL operation scenarios that result in failure include

the following

(but are not limited to) the following:

  • When the input value you provide for a column is invalid for the column type.

  • When you perform a delete operation that references a non-existent column.

  • When you use an operator that does not exist or does not match

given
  • the specific argument types.

  • When the query references some relation (schema, table, etc.) that does not exist.

  • When the query references a column that does not exist.

Error: SQL operation failed

Reason: ERROR: <scenario-specific message> Position: <number>, <error code and SQL state information>

For example: column "unknown" of relation "insertTests" does not exist Position: 55, error code: 0, SQL state: 42703

Error: Batch operation failed

Batch entry 0 <query> was aborted: ERROR: <scenario-specific message> Position: <number> Call getNextException to see other errors in the batch., <error code and SQL state information>, next exception: ERROR: <scenario-specific message>

For example: Batch entry 0 insert into "snapteam1"."insertTests" ("id", "c_int", "unknown") values (('1'::int4), ('1'::int4), ('99'::numeric)) was aborted: ERROR: column "unknown" of relation "insertTests" does not exist Position: 55 Call getNextException to see other errors in the batch., error code: 0, SQL state: 42703, next exception: ERROR: column "unknown" of relation "insertTests" does not exist Position: 55

PostgreSQL-Select

 

When the metadata is returned from the Snap’s second output view.

The original number of columns in the input data is displayed in the output.

In the Select Snap, the second output view, some new columns are introduced

.

,

For

for example

,

:

IS_GENERATEDCOLUMN , REF_GENERATION, SELF_REFERENCING_COL_NAME, TYPE_CAT, TYPE_NAME, TYPE_SCHEM

PostgreSQL-Delete

 

When the delete condition has an unterminated quote string.

Error message: SQL operation failed
Reason : ERROR: unterminated quoted string at or near "' )"\n Position: <number>, error code: 0, SQL state: 42601

Error message: SQL operation failed
Reason: "SQL [<query>]; Unterminated string literal started at position <number> in SQL <query>. Expected char"

PostgreSQL-Execute

When you provide the following query:

"create table <name> as <query>"

Status : 0
Message : Success

Status: 5
The <number> for Status indicates the number of rows used from the source to create the new table.
Message: Success

All PostgreSQL Snaps

When the Dynamic Account has incorrect credentials.

Error : SQL operation failed
Reason : "java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgresql://??postgresql-v10.nia.snaplogic.com:5432/snapteam?OpenSourceSubProtocolOverride=true, Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgresql://??postgresql-v10.nia.snaplogic.com:5432/snapteam?OpenSourceSubProtocolOverride=true"

Error message: SQL operation failed
Reason : "Failed to retrieve a database connection."