pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: spsamaan@gmail.com
Subject: BUG #18777: Error running unnest function in a two phase commit transaction
Date: Thu, 16 Jan 2025 18:35:54 +0000
Message-ID: <18777-3fa8180f86edfb55@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18777
Logged by:          Sérgio Paulo Samaan Filho
Email address:      spsamaan@gmail.com
PostgreSQL version: 15.10
Operating system:   linux
Description:        

I have a query " SELECT * FROM UNNEST(ARRAY[123456]) " running in a Groovy 4
code. That code is running in a weblogic 14 server. The driver I'm using is
postgresql-42.7.3.jar.
When the weblogic datasource is configured as a Two-phase commit I got an
error: 

Caused by: org.postgresql.util.PSQLException: ERROR: function
unnest(unknown) is not unique
  Hint: Could not choose a best candidate function. You might need to add
explicit type casts.
  Position: 250
        at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
~[postgresql-42.7.3.jar:42.7.3]
        at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412)
~[postgresql-42.7.3.jar:42.7.3]
        at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)
~[postgresql-42.7.3.jar:42.7.3]
        at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
~[postgresql-42.7.3.jar:42.7.3]
        at
org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData(PgPreparedStatement.java:1755)
~[postgresql-42.7.3.jar:42.7.3]
        at
weblogic.jdbc.wrapper.PreparedStatement.getParameterMetaData(PreparedStatement.java:1045)
~[com.bea.core.datasource6.jar:14.1.1.0]
        at groovy.sql.Sql.getParameterMetaDataSafe(Sql.java:4234)
~[groovy-sql-4.0.6.jar:4.0.6]
        at groovy.sql.Sql.setParameters(Sql.java:4216)
~[groovy-sql-4.0.6.jar:4.0.6]
        at groovy.sql.Sql.getPreparedStatement(Sql.java:4519)
~[groovy-sql-4.0.6.jar:4.0.6]
        at groovy.sql.Sql.getPreparedStatement(Sql.java:4607)
~[groovy-sql-4.0.6.jar:4.0.6]
        at groovy.sql.Sql.access$1000(Sql.java:234)
~[groovy-sql-4.0.6.jar:4.0.6]
        at groovy.sql.Sql$PreparedQueryCommand.runQuery(Sql.java:4803)
~[groovy-sql-4.0.6.jar:4.0.6]
        ... 158 more

Disabling Two-phase commit in weblogic (just for testing purpose) thw query
works properly.



view thread (2+ messages)  latest in thread

Message-ID: <18777-3fa8180f86edfb55@postgresql.org>
Permalink:  ../18777-3fa8180f86edfb55@postgresql.org/
Also on:    postgresql.org/message-id/18777-3fa8180f86edfb55@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, spsamaan@gmail.com
  Subject: Re: BUG #18777: Error running unnest function in a two phase commit transaction
  In-Reply-To: <18777-3fa8180f86edfb55@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox