From: Thomas Kellerer <shammat@gmx.net>
To: List <pgsql-jdbc@postgresql.org>
Cc: Sehrope Sarkuni <sehrope@jackdb.com>
Subject: Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body
Date: Mon, 4 Oct 2021 17:27:32 +0200
Message-ID: <12605f56-a371-04cd-1b65-ea2eb12ad835@gmx.net> (raw)
In-Reply-To: <CAH7T-aqbkHN6GrA5dPmbcJ1YU21NcooJBdWh1a=18EgqAt2U=w@mail.gmail.com>
References: <582e5837-d639-d774-5a6a-b778d91b2ec1@gmx.net>
<CAH7T-aqbkHN6GrA5dPmbcJ1YU21NcooJBdWh1a=18EgqAt2U=w@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: shammat@gmx.net, sehrope@jackdb.com
Subject: Re: Can't run CREATE PROCEDURE with new Postgres' 14 new SQL-standard body
In-Reply-To: <12605f56-a371-04cd-1b65-ea2eb12ad835@gmx.net>
References: <582e5837-d639-d774-5a6a-b778d91b2ec1@gmx.net> <CAH7T-aqbkHN6GrA5dPmbcJ1YU21NcooJBdWh1a=18EgqAt2U=w@mail.gmail.com> <12605f56-a371-04cd-1b65-ea2eb12ad835@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox