Always Back-ticks Enclosed
| User, date | Message |
|---|---|
|
Written by charlretief
2 years ago Category: Feature discussion 5 posts since Thu, 20 Jan 11 |
I sometimes use restricted words in my table names and fields like 'transaction', 'time', 'date' etc. thus I have to enclose these in `back-ticks` to make all setups of mysql accept this. To make my SQL consistent and thus pretty I have a habit of typing all table names and field names in the optional `back-ticks` enclosed. If heidiSQL has a option in the preferences for the "always use back-ticks" then the fields inserted from the left and right treeview would conform to this standard. ============ I know `backticks` are mostly optional but my personal preference is to always use them. I don't want to request this a a feature if I am the only user that does this. So lets see if there are others that would also benefit form such a feature. |
|
Written by ansgar
2 years ago 4026 posts since Fri, 07 Apr 06 |
Was discussed earlier here. |
|
Written by ansgar
2 years ago 4026 posts since Fri, 07 Apr 06 |
The problem with backticks everywhere for most users was that this results in unreadable SQL queries. So I implemented a logic which just adds backticks on reserved words - which does currently not work for data types such as "date" and "time". I'll check that. |
|
Written by charlretief
2 years ago 5 posts since Thu, 20 Jan 11 |
Yes, I just read the revision log. The reason why I like backticks everywhere is because I use different mySQL editors on the same db's. I find the sql syntax color highlighting is more consistent and readable between different editors when all fields are always backtick enclosed. That is way I asked if more users would benefit from an option in the preferences to toggle the "AlwaysQuote" behavior for code dropped in the sql editor. |
|
Written by ansgar
2 years ago 4026 posts since Fri, 07 Apr 06 |
Well you are the first to ask for such an option - for experience reasons I'm hesitating to say "yes let's make it optional". Hmm. |
|
Written by kalvaro
2 years ago 457 posts since Thu, 29 Nov 07 |
A little side note... MySQL itself has a setting related to this, the sql_quote_show_create session variable: - http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_sql_quote_show_create Currently, HeidiSQL needs that this variable is set to ON: - http://www.heidisql.com/forum.php?t=7802 I'm wondering whether it would make sense to read this variable and use it for... well, for something. In any case, I think the always quote behaviour should be at most optional. I particularly hate having all those backticks all around. |
|
Written by ansgar
2 years ago 4026 posts since Fri, 07 Apr 06 |
wrote: I particularly hate having all those backticks all around. Yes, that's what I think too and I didn't hear the opposite from anyone until now. |
|
Please login to leave a reply, or register at first. |