From: Vlad K. <hv...@op...> - 2021-05-31 14:39:56
|
31.05.2021 16:19, Adriano dos Santos Fernandes wrote: > Hi! > > EXECUTE PROCEDURE is full of weirdness, so I propose that standard SQL > CALL is adapted for our needs. > > EXECUTE PROCEDURE [ <package> . ] <name> > [ <value list> | ( <value list> ) ] > [ RETURNING_VALUES <variable list> | > RETURNING_VALUES ( <variable list> ) ] > > It does not allow one to "select" what just it wants. > > So if one changes the procedure output parameters, clients (DSQL and > PSQL) needs to be changed. It's like "SELECT *" which is sure a bad > practice. > > It has this weird RETURNING_VALUES and multiple syntax about parenthesis. > > It does not allow to just execute and ignore output parameters. As I see, all problems above is related with RETURNING_VALUES clause, correct ? > I propose that CALL syntax: > > CALL [ <package> . ] <name> ( <value list> ) > [ RETURNING { * | <value list> } ] > [ INTO <variable list> ] > > A CALL without RETURNING and without INTO will execute the procedure and > ignore possible output parameters. > > A CALL without RETURNING and with INTO (PSQL only), works like with > "RETURNING *" and EXECUTE PROCEDURE ... RETURNING_VALUES. If "CALL" is not accepted (because of non-standard syntax), why not add "correct" RETURNING clause into EXECUTE PROCEDURE ? Leave old RETURNING_VALUES clause as is for compatibility and allow to use new good RETURNING clause instead. Just my 0.02 uah Regards, Vlad |