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

[PARSING] plsql varaibles with $ and # #822

Open
sosoba opened this issue Jan 10, 2025 · 4 comments
Open

[PARSING] plsql varaibles with $ and # #822

sosoba opened this issue Jan 10, 2025 · 4 comments
Labels

Comments

@sosoba
Copy link

sosoba commented Jan 10, 2025

Describe the bug
Use variable with the characters $ or # a in the name. Example:

select :a$# from dual;

Expected behavior
Pass

Actual behavior
Parse error: Unexpected "$# from du" at line 1 column 12. SQL dialect used: "plsql".

Usage

  • How are you calling / using the library? Playground
  • What SQL language(s) does this apply to? plsql
  • Which SQL Formatter version are you using? 15.4.9
@sosoba sosoba added the bug label Jan 10, 2025
@nene
Copy link
Collaborator

nene commented Jan 14, 2025

Thanks for reporting.

Could you point me to the documentation that describes the syntax of these variables in PL/SQL? I haven't been able to find this info by myself. The best I've managed to find is this page but it doesn't describe the syntax, only the usage.

@sosoba
Copy link
Author

sosoba commented Jan 14, 2025

I searched for a long time and couldn't find anything better than the chapter 5.3.1 Rules for Placeholder on your site.

@nene
Copy link
Collaborator

nene commented Jan 14, 2025

Yeah, but this section says nothing about $ and # characters.

@sosoba
Copy link
Author

sosoba commented Jan 15, 2025

Yeah, but this section says nothing about $ and # characters.

You have right.
There is also:
Placeholder-Expressions
Database-Object-Names-and-Qualifiers.
The second says:

Nonquoted identifiers can only contain alphanumeric characters from your database character set and the underscore (_), dollar sign ($), and pound sign (#). Database links can also contain periods (.) and "at" signs (@).

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

No branches or pull requests

2 participants