730 Commits

Author SHA1 Message Date
Dimitri Fontaine
b9e26ea460 Add instructions to build a docker image for pgloader.
The current instructions build SBCL then pgloader all from sources in a
debian VM. It might be a good idea to maintain a debian+SBCL docker
image and build pgloader on top of that.
2014-11-30 18:52:35 +01:00
Dimitri Fontaine
cd52654e3d Transfer processing threads errors to the main thread, fix #130.
Handling the errors within the thread is useful when debugging pgloader
interactively, but not so much when started from the command line, where
it would hand the program forever with threads waiting for interactive
debugger actions to be taken, with no way for the user to actually take
action.
2014-11-27 00:05:12 +01:00
Dimitri Fontaine
d4cab3a81e Fix MSSQL index and foreign key names.
First, the index names in MS SQL, as in MySQL, are only unique per
table, whereas they need to be globally unique (per database) in
PostgreSQL. So reuse the infrastructure we had for MySQL here.

Second, the way we trick table names in index and fkey structures means
that we already did quote the names and we don't want to quote them
again, so add a new possible *identifier-case* value to handle the case
where nothing is to be done, pretty please.
2014-11-25 00:42:37 +01:00
Dimitri Fontaine
6240202c99 Avoid the 'dbo' schema in retrieving FKeys from MS SQL. 2014-11-24 23:46:43 +01:00
Dimitri Fontaine
f263d1b2a4 Implement Foreign Key support for MSSQL.
Piggyback as much as possible on the work already done for MySQL.
2014-11-24 23:42:19 +01:00
Dimitri Fontaine
38acce57b5 Fix parsing MSSQL options, which are actually MySQL options. 2014-11-24 23:41:20 +01:00
Dimitri Fontaine
e72325ee25 Improve Index build concurrency.
Rather than doing ALTER TABLE directly, use CREATE UNIQUE INDEX in the
all in parallel concurrent index build per table, and only in the end
game "upgrade" that unique index into a PRIMARY KEY using ALTER TABLE.

The reason why it's a good idea to do that is to avoid an ACCESS
EXCLUSIVE LOCK at ALTER TABLE time, which is killing our index build
concurrency.
2014-11-24 22:05:22 +01:00
Dimitri Fontaine
6d572be186 Add build-time hints to use proper dependencies.
We got unsync again with the qmynd driver (see #124) and the WIP branch
of esrap has been in the works for a long time now. We now manually
fetch the "proper" version of those.
2014-11-23 21:27:39 +01:00
Dimitri Fontaine
a8398c20ba Implement support for migrating MS SQL Indexes. 2014-11-22 02:02:44 +01:00
Dimitri Fontaine
5ab0831d4e Allow building pgloader even when the git command fails, fix #125. 2014-11-22 00:32:29 +01:00
Dimitri Fontaine
5ce92492ce Cast MySQL default values in some cases, fixing #124.
When querying the default values of MySQL tables against MySQL catalogs,
the default value is always returned as a string. When the column having
the default actually is a "binary" column, we want the transformation
functions to receive a proper vector of bytes.

This patch adds some hard-coded rules to be smarted about the situation
for columns of type "binary".
2014-11-22 00:04:34 +01:00
Dimitri Fontaine
5b87b1a85e Refactor *identifier-case* option into a dynamic binding.
That makes it much easier to use from about anywhere in the code, which
is what is needed. In passing, fix #129.
2014-11-21 23:32:02 +01:00
Dimitri Fontaine
5b2fb40578 TIL that MS SQL also has a "datetime2" data type.
For real.
2014-11-18 23:25:07 +01:00
Dimitri Fontaine
5d80c8371f In MS SQL, protect all identifiers with square brackets. 2014-11-18 23:24:33 +01:00
Dimitri Fontaine
caed00c234 Travis: install the freetds-dev lib now. 2014-11-17 10:55:14 +01:00
Dimitri Fontaine
87e157bee2 Add a new database source type in the parser.
Now it's possible to parse a command to load data from MS SQL. The
parser was until now parsing all database URI within the same common
rule and that isn't possible anymore if we want to distinguish in
between source database right from the parser, which we actually want to
do.

This patch also implement in-passing fixes all over the place, including
the transformation function float-to-string that only happened to work
on double-float data.
2014-11-17 00:23:06 +01:00
Dimitri Fontaine
fff756f95f Refactor the command parser.
Split its content into separate files, so that each is easier to
maintain, and to make it easier also to add support for new sources.
2014-11-16 22:22:04 +01:00
Dimitri Fontaine
c94164c05c Fix MS SQL convertion of money to numeric. 2014-11-16 21:54:13 +01:00
Dimitri Fontaine
87e2e16582 Implement data transfer from SQL Server. 2014-11-10 03:15:22 +01:00
Dimitri Fontaine
e2f6dba107 Force package names to be read in the KEYWORD package. 2014-11-10 01:17:06 +01:00
Dimitri Fontaine
03bba5f486 Some more SQL Server support (schema conversion).
Converting the table definitions (with type casting) seems to work. Also
did experiment a little with actuallt fetching some data... and had to
edit the cl-mssql driver, which is temporarily monkey patched.
2014-11-10 01:16:10 +01:00
Dimitri Fontaine
ca325ba799 Refactor the SQLite source files. 2014-11-09 22:59:30 +01:00
Dimitri Fontaine
5bc5a52582 Some more initial steps towards MS SQL support. 2014-11-09 22:30:02 +01:00
Dimitri Fontaine
6473a892d4 First steps toward MS SQL compatibility. 2014-11-09 00:09:42 +01:00
Dimitri Fontaine
4c87ece82a Add a pgloader.exe binary to the download page! 2014-11-06 23:08:32 +01:00
Dimitri Fontaine
ed853a7bea Allow pgloader to work on windows. 2014-11-06 22:12:20 +01:00
Dimitri Fontaine
3904e9f058 Typo fix. 2014-11-05 16:42:10 +01:00
Dimitri Fontaine
a5e9cb172c Follow-up to the merge, we're not a release branch. 2014-11-05 16:41:19 +01:00
Dimitri Fontaine
fc78c1f623 Update web/download with the new release. v3.1.1 2014-11-05 16:38:24 +01:00
Dimitri Fontaine
8f1fc2a7a6 Release version 3.1.1. 2014-11-05 16:20:14 +01:00
Dimitri Fontaine
9ce323007e Report the summary to *standard-output*.
There's actually no reason to insist on using the *terminal-io*
directly, that is the pty device.
2014-11-04 02:05:19 +01:00
Dimitri Fontaine
da70aaf481 Merge debian bugfix. 2014-11-03 14:15:11 +01:00
Dimitri Fontaine
4916e67a9e Fix --root-dir debian reported bug #767288 2014-11-03 14:08:51 +01:00
Dimitri Fontaine
bb2c7e4e17 Fix MySQL ENUM and SET parsing, fixing #120.
MySQL ENUM syntax is more complex than it first looked, allowing for
escaping and spaces, so use a more complex parser here. Fortunately, the
syntax looks like a CSV row enough that cl-csv can be re-used for that.
2014-10-28 14:56:53 +01:00
Dimitri Fontaine
93990317f3 Rebuild with the new (fixed) dependencies. 2014-10-28 14:56:53 +01:00
Dimitri Fontaine
03b2291332 Rebuild with the new (fixed) dependencies. 2014-10-28 10:51:36 +01:00
Dimitri Fontaine
66f34d823c Merge pull request #121 from 3manuek/master
Fix INSTALL doc
2014-10-26 15:02:37 +01:00
Emanuel
9acc716f69 Update INSTALL.md 2014-10-25 12:40:50 -03:00
Emanuel
29ebdff9f9 Update INSTALL.md
Extending documentation
2014-10-25 11:55:14 -03:00
Emanuel
b7bea28c9b Fix INSTALL doc
Added curl on the apt-get install instructions.
2014-10-25 08:27:16 -03:00
Dimitri Fontaine
68416a79b3 In passing docs review.
Also modernize the test/census-place.load to use the newer fixed file
format options, and show that in the docs.
2014-10-18 22:42:31 +02:00
Dimitri Fontaine
1bc467f1a4 TIL how to avoid ignore-errors. 2014-10-16 13:55:46 +02:00
Dimitri Fontaine
22f4317a30 Add support for the CAST rule to SQLite sources.
This allows users to benefit from the same flexible machinery when using
SQLite as when using MySQL, and also allows to add some more default
cast rules too.
2014-10-13 00:52:55 +02:00
Dimitri Fontaine
2db4fd89aa Add a sponsors page to the pgloader web site. 2014-10-09 22:52:03 +02:00
Dimitri Fontaine
9288da7c38 Ack the need for better UI in the TODO. 2014-10-09 12:23:53 +02:00
Dimitri Fontaine
f64d242f91 Typo fix. 2014-10-06 13:28:28 +02:00
Dimitri Fontaine
2d2cc26fca Allow setting dynamic space size easily at build time, fix #112. 2014-10-05 22:10:46 +02:00
Dimitri Fontaine
1fa9ed3ea0 Merge pull request #118 from gciolli/master
Fix oversight in documentation.
2014-10-02 17:12:02 +02:00
Dimitri Fontaine
b0679ede75 Register the new dependency towards cl-metabang-bind in the debian package. 2014-10-02 17:07:27 +02:00
Dimitri Fontaine
3c334dcdc4 Refactor the main parser to use the bind macro.
The metabang-bind lib offers a nice bind macro that solves the problem
of ignoring bindings in destructuring-bind, and allows a let* approach
to nested destructuring (wven when mixed with let declarations).

Using that lib (that we already indirectly depend on anyway) simplifies
the parser code substantially.
2014-10-02 17:05:35 +02:00