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

Oracle INSERT /*+ SOMEHINT */ INTO hints broken/misplaced by formatter #128

Open
marcothesane opened this issue Mar 20, 2015 · 1 comment

Comments

@marcothesane
Copy link

Dear TaoK
To start with - My compliments to your SQL formatter; it's almost perfectly fitting my own taste in formatting SQL, and I'm glad I have it now.
I wanted to point you to a bug that manifests itself in the mentioned INSERT ... SELECT statement that includes a hint of the format /+ / : The hint belongs just after the INSERT keyword, before INTO. After re-formatting, it lands between the INTO keyword and the table name, which causes the Vertica compiler to choke with a syntax error. Not a problem if you know it - you just add a macro to swap the two symbols - but I thought I'd let you know.
Compliments again for that formatter! - Marco the Sane
See this example of a Vertica hint:
Before:
insert /+label(formatlabel)/ into foo values (42,'Arthur');
After:
INSERT INTO /+label(formatlabel)/ foo
VALUES (
1
,'Arthur'
);

@TaoK
Copy link
Owner

TaoK commented Nov 5, 2017

It makes sense that this is happening, and it makes sense that it's not acceptable for Oracle contexts. Priority noted accordingly.

@TaoK TaoK changed the title Hint misplaced in INSERT INTO <table> SELECT ... statement Oracle INSERT /*+ SOMEHINT */ INTO hints broken/misplaced by formatter Nov 5, 2017
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