Re: Stored procedures and out parameters - Mailing list pgsql-hackers

From Vladimir Sitnikov
Subject Re: Stored procedures and out parameters
Date
Msg-id CAB=Je-HF34hU6JqnjFT0qBHS9LCkSDOyQSotwrxW6t3D76nDNw@mail.gmail.com
Whole thread Raw
In response to Re: Stored procedures and out parameters  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: Stored procedures and out parameters  ("Daniel Verite" <daniel@manitou-mail.org>)
Re: Stored procedures and out parameters  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Andrew>does it fail on the latest 11-stable

1) Current "build from Git/master PostgreSQL" produces the data row for both simple and extended queries.

2) Just a side note: `CALL my_proc()` is not suitable for functions. That looks weird.
Is the client expected to lookup system catalogs in order to tell if `my_proc` is procedure or function and use either `call my_proc` or `select * from my_proc()`?
Issuing `call my_function()` fails with 42883 ERROR: my_func(unknown) is not a procedure

Note: JDBC defines two options to call a stored procedure:
   {?= call <procedure-name>[(<arg1>,<arg2>, ...)]}
   {call <procedure-name>[(<arg1>,<arg2>, ...)]}

There's no notion if the called object is a procedure or function.
Note: PostgreSQL can have a function that `returns void`, and it is hard to tell if {call test()} refers to a function or procedure.

Can functions and procedures be unified at the backend level?
For instance, support "CALL" for both of them.
Or support "select * ..." for both of them.

Vladimir​

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How can we submit code patches that implement our (pending)patents?
Next
From: Nico Williams
Date:
Subject: Re: How can we submit code patches that implement our (pending)patents?