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