From 52e3371be875e51e5d9f1ddb62896cb47f4ecc7a Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Mon, 22 Sep 2014 14:34:57 +0200 Subject: [PATCH] Review default SQLite options. --- pgloader.1 | 3 +++ pgloader.1.md | 5 +++++ src/sources/sqlite.lisp | 10 +++++----- test/sqlite.load | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pgloader.1 b/pgloader.1 index 7897bfb..dc61ab5 100644 --- a/pgloader.1 +++ b/pgloader.1 @@ -1587,6 +1587,9 @@ Path or HTTP URL to a SQLite file, might be a \fB\.zip\fR file\. .IP When loading from a \fBSQLite\fR database, the following options are supported: . +.IP +When loading from a \fBSQLite\fR database, the following options are supported, and the default \fIWITH\fR clause is: \fIno truncate\fR, \fIcreate tables\fR, \fIinclude drop\fR, \fIcreate indexes\fR, \fIreset sequences\fR, \fIdowncase identifiers\fR, \fIencoding \'utf\-8\'\fR\. +. .IP "\(bu" 4 \fIinclude drop\fR . diff --git a/pgloader.1.md b/pgloader.1.md index d61b785..02b0f7b 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -1299,6 +1299,11 @@ The `sqlite` command accepts the following clauses and options: When loading from a `SQLite` database, the following options are supported: + When loading from a `SQLite` database, the following options are + supported, and the default *WITH* clause is: *no truncate*, *create + tables*, *include drop*, *create indexes*, *reset sequences*, *downcase + identifiers*, *encoding 'utf-8'*. + - *include drop* When this option is listed, pgloader drop in the PostgreSQL diff --git a/src/sources/sqlite.lisp b/src/sources/sqlite.lisp index c6d0b3a..e4f678d 100644 --- a/src/sources/sqlite.lisp +++ b/src/sources/sqlite.lisp @@ -246,13 +246,13 @@ (defmethod copy-database ((sqlite copy-sqlite) &key state-before - truncate data-only schema-only - create-tables - include-drop - create-indexes - reset-sequences + (truncate nil) + (create-tables t) + (include-drop t) + (create-indexes t) + (reset-sequences t) only-tables including excluding diff --git a/test/sqlite.load b/test/sqlite.load index dae136e..c7ffe04 100644 --- a/test/sqlite.load +++ b/test/sqlite.load @@ -2,6 +2,6 @@ load database from 'sqlite/sqlite.db' into postgresql:///pgloader - with include drop, create tables, create indexes, reset sequences + -- with include drop, create tables, create indexes, reset sequences set work_mem to '16MB', maintenance_work_mem to '512 MB'; \ No newline at end of file