Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CALL in procedural languages #11356

Closed
12 tasks done
Tracked by #10528
lukaseder opened this issue Feb 2, 2021 · 0 comments
Closed
12 tasks done
Tracked by #10528

Add support for CALL in procedural languages #11356

lukaseder opened this issue Feb 2, 2021 · 0 comments

Comments

@lukaseder
Copy link
Member

lukaseder commented Feb 2, 2021

An essential piece of functionality inside of stored functions and procedures (#9190) is the standard SQL <call statement> and by consequence <routine invocation> support, which helps compose procedural routines for greater reusability.

The various syntaxes differ greatly, e.g.

Standard SQL (Db2, HSQLDB, MariaDB, MySQL, PostgreSQL)

'CALL' routineName '(' argument { ',' argument } ')'

Where an argument can be different things, including a named argument of the form parameterName '=>' value

Firebird

'EXECUTE PROCEDURE' routineName '(' argument { ',' argument } ')' [ 'RETURNING_VALUES' argument { ',' argument } ]

Oracle

routineName '(' argument { ',' argument } ')'

SQL Server

'EXEC' routineName argument { ',' argument }

Support will be added in:

  • Db2
  • Firebird
  • HSQLDB
  • Informix
  • MariaDB
  • MySQL
  • Oracle
  • PostgreSQL
  • SQL Server

Postponed support:

  • H2 (is it even possible? Seems tricky)
  • HANA
  • Teradata (all of Teradata's procedural language needs to be supported eventually)

And, as always

  • In the parser

Additional features:

Out of scope (for now):

  • Support named and defaulted parameters in the API and parser
  • Some dialects (e.g. BigQuery) require qualification for their procedures in CALL. Can we do that automatically?
  • Meta lookups

The various syntaxes for capturing OUT parameters will be explored as well


Related but not the same: #3426, though if CALL was made an executable Query, then we might not need #3426 anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant