Hacker News new | ask | show | jobs
by phoyd 281 days ago
I want to drop here the not very well known fact, that the SQL Standard grammar distinguishes between "SQL language identifier" and "regular identifier". According to the rules, a SQL language identifier can not end with an underscore (copied from ISO/IEC 9075-2:1999 "5.4 Names and identifiers":

<SQL language identifier> ::=<SQL language identifier start> [ { <underscore> | <SQL language identifier part> }... ]

<SQL language identifier start> ::= <simple Latin letter> <SQL language identifier part> ::= <simple Latin letter> | <digit>

So, using names with trailing underscore should always be safe.

1 comments

It_ might_ be_ safe_, but_ it_ is_ definitely_ annoying_.