Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body
Дата
Msg-id CADK3HHJQKArsRJbRWybewLOcw6pWHFecSzFJD2RrP+TEDOFRSw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body  (Thomas Kellerer <shammat@gmx.net>)
Список pgsql-jdbc


On Mon, 4 Oct 2021 at 11:27, Thomas Kellerer <shammat@gmx.net> wrote:
Sehrope Sarkuni schrieb am 04.10.2021 um 14:49:
> On Sun, Oct 3, 2021 at 8:08 AM Thomas Kellerer <shammat@gmx.net <mailto:shammat@gmx.net>> wrote:
>
>     Postgres 14 supports SQL standard conforming bodies for functions and procedures
>     which are no longer string constants, e.g.
>
>     create or replace procedure do_stuff()
>        language sql
>        begin atomic
>          select 1;
>          select 2;
>        end
>
>     However, it seems that the JDBC driver will parse the string and split it into
>     multiple statements based on the semicolons thus making it an invalid create procedure
>     statement.
>
>
> If you set the connection property "preferQueryMode" to "simple" or
> "extendedForPrepared", then the driver will not attempt to split the
> statement into multiple commands.

Thanks, that works fine.

Changing the connection URL is a good enough solution for me.

Thomas

Serhope,

We should probably document this..

Dave Cramer
www.postgres.rocks
 

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body
Следующее
От: Dave Cramer
Дата:
Сообщение: [pgjdbc/pgjdbc] daeea3: fix spacing on GSS_ENC_MODE (#2280)