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 the SET command to assign values to variables #7306

Closed
3 tasks done
lukaseder opened this issue Mar 15, 2018 · 4 comments
Closed
3 tasks done

Add support for the SET command to assign values to variables #7306

lukaseder opened this issue Mar 15, 2018 · 4 comments

Comments

@lukaseder
Copy link
Member

lukaseder commented Mar 15, 2018

In databases supporting procedural languages, there is always a way to assign a value to a variable.

  • In SQL Server, we can generate the SET command for this. It can even take SELECT statements as argument expressions
  • In Oracle, a SET command translates either to an assignment var := value; or ...
  • ... to a SELECT .. INTO statement

There may be other syntaxes


For variable declarations, see #7305 (this depends on declarations)

@sainthDE
Copy link

Maybe it's also possible to support the SET LOCAL of PostgreSQL. So it will be possible to support RLS shown like here.

@lukaseder
Copy link
Member Author

@sainth- Thanks for your comment. That's a different type of SET command. This issue is about assigning a value to a previously declared local variable, within a statement batch, anonymous block, or stored procedure - i.e. part of the procedural languages. Yours is part of the SQL language.

@lukaseder
Copy link
Member Author

(by which I mean to say: I sense a completely separate use-case in your message, which I'm more than happy to discuss in a new github issue!)

@sainthDE
Copy link

@lukaseder Sorry, my mistake. I will create a new issue.

lukaseder added a commit that referenced this issue Jan 3, 2019
- [#7305] Add support for DECLARE statements inside of statement blocks
- [#7306] Add support for the SET command to assign values to variables
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

2 participants