Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near '' at line 21."

when line 21 is 175 characters long. also, the fact that anything other than InnoDB is barely real ACID. also, the stuck development and lack of support for json, uuid and many other things.

mysql being user-friendly (and especially beginner-friendly) is a massive hoax.



This should instead be something like this:

    SQL Error (1064):
      20 |
      21 |  ...ROM my_table JOIN other_table ON GROUP BY
      22 |                                      ^^^^^

This should not be hard. Both MySQL and Postgres do have the span of the parsing error and they do have the original query somewhere.


Just because I spent a few hours in the postgres parser guts lately:

Postgres doesn't quite have the span of the error, just a single location :). We can of course measure the length of the token at the error point, but that isn't quite the same, as the cause of the error does not have to be a single token.

  postgres[122581][1]=# SELECT * FROM kdjfkdj;
  ERROR:  42P01: relation "kdjfkdj" does not exist
  LINE 1: SELECT * FROM kdjfkdj;
                        ^




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: