Item 1: enable persistent naming/number of SQL queries Date: 24 Jan, 2007 Origin: Mark Bergman Status:
What: Change the parsing of the query.sql file and the query command so that queries are named/numbered by a fixed value, not their order in the file. Why: One of the real strengths of bacula is the ability to query the database, and the fact that complex queries can be saved and referenced from a file is very powerful. However, the choice of query (both for interactive use, and by scripting input to the bconsole command) is completely dependent on the order within the query.sql file. The descriptve labels are helpful for interactive use, but users become used to calling a particular query "by number", or may use scripts to execute queries. This presents a problem if the number or order of queries in the file changes. If the query.sql file used the numeric tags as a real value (rather than a comment), then users could have a higher confidence that they are executing the intended query, that their local changes wouldn't conflict with future bacula upgrades. For scripting, it's very important that the intended query is what's actually executed. The current method of parsing the query.sql file discourages scripting because the addition or deletion of queries within the file will require corresponding changes to scripts. It may not be obvious to users that deleting query "17" in the query.sql file will require changing all references to higher numbered queries. Similarly, when new bacula distributions change the number of "official" queries, user-developed queries cannot simply be appended to the file without also changing any references to those queries in scripts or procedural documentation, etc. In addition, using fixed numbers for queries would encourage more user-initiated development of queries, by supporting conventions such as: queries numbered 1-50 are supported/developed/distributed by with official bacula releases queries numbered 100-200 are community contributed, and are related to media management queries numbered 201-300 are community contributed, and are related to checksums, finding duplicated files across different backups, etc. queries numbered 301-400 are community contributed, and are related to backup statistics (average file size, size per client per backup level, time for all clients by backup level, storage capacity by media type, etc.) queries numbered 500-999 are locally created Notes: Alternatively, queries could be called by keyword (tag), rather than by number. ------- Mark Bergman [EMAIL PROTECTED] System Administrator Section of Biomedical Image Analysis 215-662-7310 Department of Radiology, University of Pennsylvania http://pgpkeys.pca.dfn.de:11371/pks/lookup?search=mark.bergman%40.uphs.upenn.edu The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users