Re: BUG #15842: Unable to run a prepared statement using theorg.postgresql Java Library

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15842: Unable to run a prepared statement using theorg.postgresql Java Library
Дата
Msg-id CAKFQuwb79U2Lm+MRr3OGoHMRAOAjjjNh+B+RKmMPYMMRkmDkEw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #15842: Unable to run a prepared statement using the org.postgresql Java Library  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Mon, Jun 10, 2019 at 4:24 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      15842
Logged by:          Matthew James Briggs
Email address:      mjb@bitflip.software
PostgreSQL version: 10.7
Operating system:   Linux (Dockerhub postgres:10)
Description:       


This isn't a bug; you attempted to add question marks to a location where they are not interpreted as parameters.

Basically you wrote:

SELECT 'let me say ? ? to you';

Which is a perfectly valid query that has zero input parameters and will return:

"let me say ? ? to you"

It has no input parameters because the question marks you wrote are inside a string literal.

The $$...$$ in your DO statement also denote a string literal.

I suggest you write an actual CREATE FUNCTION and then call that using:

SELECT function(?, ?)

David J.


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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15842: Unable to run a prepared statement using the org.postgresql Java Library
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15843: Postgresql11 installation fails on Fedora 29