Re: psqlODBC driver does not support escape sequence for calling SQL procedures '{call procedure-name[([parameter][,[parameter]]...)]}'

"Inoue, Hiroshi" <[email protected]> Tue, 15 Oct 2019 20:40:27 +0900
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------7EC3961B662B88A8D4B87C71
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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
<https://www.postgresql.org/message-id/4285.1537201440%40sss.pgh.pa.us>

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



-- 
このメールは、AVG によってウイルス チェックされています。
http://www.avg.com

--------------7EC3961B662B88A8D4B87C71
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Jarek,<br>
    <br>
    There was a discussion of the CALL behavior: <a
href="https://www.postgresql.org/message-id/4285.1537201440%40sss.pgh.pa.us">https://www.postgresql.org/message-id/4285.1537201440%40sss.pgh.pa.us</a>
    .<br>
    <br>
    regards,<br>
    Hiroshi Inoue<br>
    <a
href="https://www.postgresql.org/message-id/4285.1537201440%40sss.pgh.pa.us"></a>
    <div class="gmail_default" style="font-family:verdana,sans-serif"><br>
    </div>
    <div class="moz-cite-prefix">On 2019/10/14 22:16, J.Bartkowiak
      (Inetia) wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">ODBC
      Driver version: 12.00
      <br>
      PostgreSQLdatabase version: PostgreSQL 12.0
      <br>
      Operating system: Windows 10 Pro
      <br>
      <br>
      SQL-level procedures (new in PostgreSQL 11) are not supported by
      ODBC call sequence '{call
      procedure-name[([parameter][,[parameter]]...)]}'.
      <br>
      <br>
      Example:
      <br>
      <br>
      Definition of SQL my_proc() procedure:
      <br>
      <br>
      CREATE OR REPLACE PROCEDURE my_proc()
      <br>
      AS $$
      <br>
      BEGIN
      <br>
        raise notice 'Hello from my_proc() procedure.';
      <br>
      END;
      <br>
      $$ LANGUAGE plpgsql;
      <br>
      <br>
      Call to procedure my_test():
      <br>
      <br>
      SQLExecDirect(hstmt, "{call my_test()}", SQL_NTS);
      <br>
      <br>
      returns error 'my_test() is a procedure;'.
      <br>
      <br>
      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.
      <br>
      <br>
      <br>
      Regards,
      <br>
      Jarek Bartkowiak<br>
    </blockquote>
    <br>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
	<tr>
      <td style="width: 55px; padding-top: 18px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt=""  width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
		<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">ウイルス フリー。 <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avg.com</a> 		</td>
	</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>

--------------7EC3961B662B88A8D4B87C71--