Re: Moving from PHP to Java: A result was returned when none was expected.
| От | David G. Johnston |
|---|---|
| Тема | Re: Moving from PHP to Java: A result was returned when none was expected. |
| Дата | |
| Msg-id | CAKFQuwZM6VaiuEGx9=kNnpninhGNechh0QPXXKA8m=rFcsQeVw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Moving from PHP to Java: A result was returned when none was expected. (Jan de Visser <jan@de-visser.net>) |
| Ответы |
Re: Moving from PHP to Java: A result was returned when none was expected.
Re: Moving from PHP to Java: A result was returned when none was expected. |
| Список | pgsql-general |
Point is that you're doing a SELECT. A SELECT returns a result, which can be
empty. I would use executeQuery and ignore the result.
There is a bit of a mismatch between the JDBC stored procedure model and the
pgsql function model, because pgsql doesn't have true stored procedures.
Can you point to docs, JDBC and/or PG, that describe what it means to "RETURN void"?
At a high-level SQL returns SETs and the empty set is a valid SET. I take it from your comment that JDBC considers the empty set "a result", whose record count is zero.
David J.
В списке pgsql-general по дате отправления: