3 ms·
I don't think this is something that warrants such a change, but if I had a choice I would prefer to be able to completely avoid using comma, maybe just by usin
by mrighele 2y ago
I don't think this is something that warrants such a change, but if I had a choice I would prefer to be able to completely avoid using comma, maybe just by using an extra pair of parenthesis. I this would break in more than one way, but one can dream.
SELECT (a b c) from sometable where id in (10 20 30)
This would be quite useful when doing exploratory work and you want also to copy/paste values from somewhere else.
But to be fair the main issue in this case is handling of the WHERE clause, because (un)commenting parts is never straightforward
select foo from bar
where
x < y -- cannot just comment this
and (
z = 10 -- neither I can comment just this
or baz is not null
)
Yes, one could put AND and OR on their own like, but similarly one could put a comma on a line of its own...
- ars 2y agoYou want to replace comma with space or newline, and use parentheses to disambiguate subexpressions. I'm not convinced this is better than what you are replacing.