Re: BUG #18777: Error running unnest function in a two phase commit transaction - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18777: Error running unnest function in a two phase commit transaction
Date
Msg-id 1850521.1737055558@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18777: Error running unnest function in a two phase commit transaction  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> 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

Presumably what is happening is that the query actually being sent
to the server is something like

    SELECT * FROM UNNEST($1)

with no hint as to what the data type of $1 is, making it impossible
to infer the unnest's result type.  I don't know whether the JDBC
driver or weblogic is more at fault, but this isn't a server-side bug.
Some level on the client side has to take responsibility for
specifying the data type of the parameter.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18775: PQgetCopyData always has an out-of-memory error if the table field stores bytea ~700 MB
Next
From: PG Bug reporting form
Date:
Subject: BUG #18778: Query planning fails in ExecInitExprRec with unrecognized node type