Re: psqlODBC driver does not support escape sequence for calling SQLprocedures '{call procedure-name[([parameter][,[parameter]]...)]}' - Mailing list pgsql-odbc

From Inoue, Hiroshi
Subject Re: psqlODBC driver does not support escape sequence for calling SQLprocedures '{call procedure-name[([parameter][,[parameter]]...)]}'
Date
Msg-id 6f7742c4-b3ac-3b9d-b1bb-c55d3e743226@dream.email.ne.jp
Whole thread Raw
In response to psqlODBC driver does not support escape sequence for calling SQLprocedures '{call procedure-name[([parameter][,[parameter]]...)]}'  ("J.Bartkowiak (Inetia)" <jaroslaw.bartkowiak@inetia.pl>)
List pgsql-odbc
Hi Jarek,

There was a discussion of the CALL behavior: https://www.postgresql.org/message-id/4285.1537201440%40sss.pgh.pa.us .

regards,
Hiroshi Inoue

On 2019/10/14 22:16, J.Bartkowiak (Inetia) wrote:
ODBC Driver version: 12.00
PostgreSQLdatabase version: PostgreSQL 12.0
Operating system: Windows 10 Pro

SQL-level procedures (new in PostgreSQL 11) are not supported by ODBC call sequence '{call procedure-name[([parameter][,[parameter]]...)]}'.

Example:

Definition of SQL my_proc() procedure:

CREATE OR REPLACE PROCEDURE my_proc()
AS $$
BEGIN
  raise notice 'Hello from my_proc() procedure.';
END;
$$ LANGUAGE plpgsql;

Call to procedure my_test():

SQLExecDirect(hstmt, "{call my_test()}", SQL_NTS);

returns error 'my_test() is a procedure;'.

The problem is that psqlODBC driver is treating procedures like functions and translates '{call ...}' to 'SELECT * FROM ...', which is wrong for procedures. They must be executed using 'CALL' keyword.


Regards,
Jarek Bartkowiak


ウイルス フリー。 www.avg.com

pgsql-odbc by date:

Previous
From: "Inoue, Hiroshi"
Date:
Subject: Re: pgsql 12.0
Next
From: Christoph Gößmann
Date:
Subject: Compile Errors on Mac OS X 10.14.6 (fatal error: 'iODBC/sqltypes.h'file not found)