distal-attribute
distal-attribute
distal-attribute
distal-attribute

Backticks in table editor

User, date Message
Written by kalvaro
3 years ago
Category: General
587 posts since Thu, 29 Nov 07
HeidiSQL has successfully removed redundant backticks from almost all places, but they remain in the "CREATE code" and "ALTER code" tabs:

ALTER TABLE `contact`
ADD COLUMN `var_number` VARCHAR(20) NULL DEFAULT NULL AFTER `contact_name`;



Would it be feasible to get rid of those as well?
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Oh they remain in more than these two places - they're just removed in the query tab features. But probably you're right - why not remove useless and annoying backticks wherever they touch the users eye.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Done in r3938
Written by kalvaro
3 years ago
587 posts since Thu, 29 Nov 07
Superb! Thanks a lot. I hadn't fully realised how much it hate backticks until they've vanished.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Indeed. Well at least they made the backticks optionally.
Written by Rapid-eraser
3 years ago
34 posts since Wed, 23 Jun 10
I kinda like backticks unhappy
Makes code more clear for me... I'll keep filling them my self :)
Written by charlretief
3 years ago
5 posts since Thu, 20 Jan 11
I am with Rapid-eraser on this one. I write all my MySQL code with back-ticks in my MySQL sources. (As I have already stated in an earlier post).

I get it that alot of developers don`t like the back-ticks, but some of us do.

1) It makes it easier to read (for some of us)
2) and more robust vs future MySQL version updates that add new restricted keywords. How will you keep up with the new keywords introduced in v6 or 7 or 8 of MySQL [EX in MySQL 5.5 the following new words are now restricted (GENERAL; IGNORE_SERVER_IDS; MASTER_HEARTBEAT_PERIOD; MAXVALUE; RESIGNAL; SIGNAL; SLOW)]?
3) How about other servers like Percona or MariaDB that might add their own restricted keywords?

I am not saying this is a bad feature, but please make it configurable in the application preferences to always use back-ticks in sql.

Written by charlretief
3 years ago
5 posts since Thu, 20 Jan 11
OK, sorry i was stupid with questions 2 and 3.
You probably just execute "SET SQL_QUOTE_SHOW_CREATE = 0;" in the background and let the server handle the necessary quoting.surprised

But my concerns are also for robustness vs future updates for the the 50000+ lines of sql code I have in stored routines. I don't take any chances with not having back-ticks in these routines for the reasons 2 and 3 states above.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
I broke the "copy columns" feature as I removed optional backticks in CREATE and ALTER tabs. ParseTableStructure requires backticks or doublequotes around column names. Not a problem until generated CREATE code was reused in that "copy columns" feature. I will revert r3938 so backticks in both tabs will reappear, to fix issue #2540.
 

Please login to leave a reply, or register at first.