X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=docs%2Fmysql2sql.rst;h=e51ea60404c435b1f5d639dbed8534244a2ee535;hb=920a6fabfcb86d3d8db75fffc047e6d51483e8f2;hp=ec3062bbf1b3234b403d0744d67f0eb58998f857;hpb=6978b242d0e02f65473930e9e2a0f2665c2e8863;p=sqlconvert.git diff --git a/docs/mysql2sql.rst b/docs/mysql2sql.rst index ec3062b..e51ea60 100644 --- a/docs/mysql2sql.rst +++ b/docs/mysql2sql.rst @@ -2,13 +2,14 @@ mysql2sql ========= This is mysql2sql, a mysql to sql converter. It is primary intended to -convert mysqldump (especially with extended INSERT syntax) to standard -SQL to load at least to PostgreSQL or SQLite. +convert mysqldump (especially with extended INSERT syntax) to standard SQL +to load at least to PostgreSQL or SQLite. -The program is in the early stage of development and currently cannot do much. -It removes /\*! directives \*/, unquotes names quoted with backticks, quote -non-lowercase names with double quotes, unescapes strings and escapes them to a -different quoting style, and passes everything else unmodified. +The program removes /\*! directives \*/, unquotes names quoted with +backticks, quote non-lowercase names with double quotes, unescapes strings +and escapes them to a different quoting style, and splits extended INSERTs +into a series of plain INSERTs separated by newlines. Everything else is +passed unmodified. .. highlight:: none @@ -38,16 +39,16 @@ Options:: infile Input file, stdin if absent or '-' -o, --outfile outfile Output file, stdout if absent or '-' -Options `-m/-p/-s` change quoting style. `-m` sets MySQL quoting style; it's -added to use the program in the following scenario: convert MySQL dumps with -extended INSERTs to SQL with plain INSERTS suitable to be fed back to MySQL. -`-p` sets PostgreSQL quoting style; it's like MySQL with additional `E''-style -quoting +Options `-m/-p/-s` change quoting style. `-m` sets MySQL quoting style; +it's added to use the program in the following scenario: convert MySQL +dumps with extended INSERTs to SQL with plain INSERTS suitable to be fed +back to MySQL. `-p` sets PostgreSQL quoting style; it's like MySQL with +additional `E''-style quoting `_. `-s` sets generic SQL/SQLite quoting style; this is the default. -If stderr is connected to the console the program displays a text mode progress -bar. Option `-P/--no-pbar` inhibits it. +If stderr is connected to the console the program displays a text mode +progress bar. Option `-P/--no-pbar` inhibits it. Option `-o` is useful when infile is absent (input is redirected), for example::