Excerpts from Tim Soderstrom's message of Wed Oct 19 12:09:31 -0700 2011: > > On Oct 19, 2011, at 1:43 PM, Olaf van der Spek wrote: > > > On Wed, Oct 19, 2011 at 8:38 PM, David Shrewsbury > > <[email protected]> wrote: > >> It's not the output formatting that is what is attractive, it's that > >> in combination with the ability to be selective about which > >> rows are returned. And to be able to join against other tables > >> to make CSV report files to be delivered to someone is a > >> powerful feature that can be done in a single statement. I > > > > Executing arbitrary statements can be done just as easily by the > > scripting language of your choice. > > Maybe for someone that rocks Python everyday. I have to agree with Shrews - > it's very convenient to only have to put my DBA hat on. One can argue I could > also write a database in the scripting language of my choice. Maybe not a > good one, but one nonetheless. Where do we draw the line with ripping so much > useful stuff out of Drizzle that there is nothing left? What's next, the SQL > parser? :) Obviously, that is in jest, but hopefully my point rings true > here. We're not talking about everything in the kitchen sink. >
A new tool would be overkill.. has nobody ever done this with the mysql command line client?: mysql -N -e 'select * from table' > file.txt This produces a tab separated file of the results of the select (remove -N and you get table headings) If you want a library call that does something similar.. you are already out of DBA land and into code land, you can use one of the thousands of "array to csv" converters in your language of choice. There is really no good reason to use SELECT INTO OUTFILE. > The impression I got from this discussion is that the big of code that > produces the CSV isn't really doing any harm? If so, I would think better > things can be done by refactoring or removing bad code, or looking towards > new and useful features (such as adding --tab to drizzledump, which could > make part of this conversation moot). Its a mis-feature that is unnecessary and actually less useful than the example above. I say again, remove it. BTW, --tab in mysqldump uses SELECT INTO OUTFILE _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

