[TxMt] Copy Condensed SQL to clipboard bug : removing newlines from string literals
kumar.mcmillan at gmail.com
Mon Jan 16 17:41:19 UTC 2006
yes, it basically only handles semi-colon terminated SQL where
whitespace doesn't matter. If command+C doesn't work for your kind of
SQL then you or someone will need to add escape sequence translations
to the TextMate command. I don't know if the escape sequences are
going to change from shell to shell; I haven't tried it in a psql or
mysql shell to see what works as a new line escape sequence.
I originally added this command because the psql shell seems to screw
up copied/pasted SQL commands when they are on multiple lines. This
could be a problem with my local terminal, I don't know exactly. I
work a lot on remote servers---using the local psql shell---to run
huge queries and this command makes it a little easier to grab a query
from TM and run it. It also keeps shell history in tact which is nice
for re-running queries.
On 1/16/06, Matthijs Bomhoff <matthijs at quarantainenet.nl> wrote:
> the "copy condensed sql to clipboard" function removes newlines from
> string literals as well, effectively changing the semantics of the
> query. It would be nice if it replaced them with the correct escape-
> sequences, or even left them in...
> e.g. if you copy "SELECT 'line 1
> line 2' " to you clipboard, you get "SELECT 'line 1 line 2'", that
> actually does something else... Especially nasty with INSERT/UPDATE
> queries etc.
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
More information about the textmate