diff --git a/README.md b/README.md index 1abfec6..bcb5a92 100644 --- a/README.md +++ b/README.md @@ -123,83 +123,10 @@ Some notes about what I intend to be working on next. - commands: `LOAD` and `INI` formats - compat with `SQL*Loader` format - -Here's a quick spec of the `LOAD` grammar: - - LOAD FROM '/path/to/filename.txt' - stdin - http://url.to/some/file.txt - mysql://[user[:pass]@][host[:port]]/dbname - [ COMPRESSED WITH zip | bzip2 | gzip ] - - WITH workers = 2, - batch size = 25000, - batch split = 5, - reject file = '/tmp/pgloader/.dat' - log file = '/tmp/pgloader/pgloader.log', - log level = debug | info | notice | warning | error | critical, - truncate, - fields [ optionally ] enclosed by '"', - fields escaped by '"', - fields terminated by '\t', - lines terminated by '\r\n', - encoding = 'latin9', - drop table, - create table, - create indexes, - reset sequences - - SET guc-1 = 'value', guc-2 = 'value' - - PREPARE CLIENT WITH ( ) - PREPARE SERVER WITH ( ) - - INTO postgresql://[user[:pass]@][host[:port]]/dbname?table-name - [ WITH SET ] - ( - field-name data-type field-desc [ with column options ], - ... - ) - USING (expression field-name other-field-name) as column-name, - ... - - INTO table-name [ WITH SET ] - ( - * - ) - - WHEN - - FINALLY ON CLIENT DO ( ) - ON SERVER DO ( ) - - < data here if loading from stdin > - -The accepted column options are: - - terminated by ':' - nullif { blank | zero date } - date format "DD-Month-YYYY" - -And we need a database migration command syntax too: - - LOAD DATABASE FROM mysql://localhost:3306/dbname - INTO postgresql://localhost/db - WITH drop tables, - create tables, - create indexes, - reset sequences, - - SET guc = 'value', ... - CAST tablename.column to timestamptz drop default, - varchar to text, - int with extra auto_increment to bigserial, - datetime to timestamptz drop default, - date to date drop default; + - see pgloader.1.md for details. ### docs - - write proper documentation - host a proper website for the tool, with use cases and a tutorial ### error management diff --git a/pgloader.1.md b/pgloader.1.md index 5180757..305971b 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -535,7 +535,7 @@ Here's an example: FROM mysql://root@localhost/sakila INTO postgresql://localhost:54393/sakila - WITH drop tables, create tables, create indexes, reset sequences + WITH include drop, create tables, create indexes, reset sequences SET maintenance_work_mem to '128MB', work_mem to '12MB', @@ -758,10 +758,6 @@ the following limitations: The difficulty of doing so is not yet assessed. - - Foreign Keys are not migrated - - It's on the roadmap, it's just not done yet. - - `ON UPDATE CURRENT_TIMESTAMP` is currently not migrated It's simple enough to implement, just not on the priority list yet.