Re: BUG #17427: ERROR: cannot cast type bytea to bigint

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17427: ERROR: cannot cast type bytea to bigint
Дата
Msg-id CAKFQuwaK439fhf+OqF5q9kp7h6F2rZD78NLNqjtpxchwF1=M=g@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17427: ERROR: cannot cast type bytea to bigint  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Sun, Mar 6, 2022 at 4:14 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17427
Logged by:          Ahmed Tareque
Email address:      tareque.bracu@gmail.com
PostgreSQL version: 14.0
Operating system:   Windows
Description:       

Error :
SQL Error: 0, SQLState: 42846.
ERROR: cannot cast type bytea to bigint
could not extract ResultSet; SQL [n/a]; nested exception is
org.hibernate.exception.SQLGrammarException: could not extract ResultSet

Due to the presence of the Java stuff this doesn't qualify as a PostgreSQL bug report and thus this is the wrong place to post.

It is also unlikely to be an actual bug in any vendor software, rather it is likely that you just are not using the API correctly.  For questions of that nature an email to either the PostgreSQL -general list or a Java-oriented community is more useful, the latter being much more likely to find an audience that can assist you.

"AND (:tamTypeId is null or tap.id = cast(:tamTypeId AS
bigint))

The only way you get the aforementioned error is if PostgreSQL, when it executes this query, thinks that the value in the cast is of type bytea; and it will not matter whether the value is null or not.  But the logic as to how "cast(:tamTypeId as bigint)" is transformed into SQL that is sent to the server is completely outside the purview of PostgreSQL and as such, as noted above, outside the purview of this mailing list.

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: BUG #17393: Delete database after recovery with point-in-time is still missing datafiles
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17428: last_value incorrect for uninitialized sequence