5 ms·
Syntactic sugar that's only natively supported in PostgreSQL? The site's banner says, "A lot has changed since SQL-92". Be that as it may, but it seems no one h
by Xophmeister 10y ago
Syntactic sugar that's only natively supported in PostgreSQL? The site's banner says, "A lot has changed since SQL-92". Be that as it may, but it seems no one has really bothered catching up. I wonder why that is...
My guess is that such extensions, while useful, are somewhat marginalised features in terms of usage. Thus, no one ever learns them formally and just Googles for what they need -- if it comes up -- and get the CASE solution, in this case (pun unintentional). Hence perpetuating that pattern. Also, of course, the CASE solution is a lot more powerful as the returned expression, that gets fed into the aggregate function, can be basically anything.
- MarkusWinand 10y agoI see the value of FILTER mostly in ease to read and understand. Many things — e.g., Pivot — can be understood way more easily using FILTER rather than CASE.
- driusan 10y agoI think the most well-thought-out explanation I've seen for why widespread support for the SQL standard seemed to stop after SQL-92 is this one: http://www.wiscorp.com/is_sql_a_real_standard.pdf http://www.wiscorp.com/is_sql_a_real_standard.pdf
- Xophmeister 10y agoThis was quite interesting; thank you for posting... I may be cheeky and submit it to HN.
- driusan 10y agoI'm fairly sure I originally saw it on HN.
- baq 10y agoand in js transpilers are bread and butter tech. sql isn't as cool i guess.