1409 Commits

Author SHA1 Message Date
Christoph Berg
4eb8c7367f releasing package pgloader version 3.5.2-2 debian/3.5.2-2 2018-07-03 22:53:02 +02:00
Christoph Berg
852b3bc888 debian: Test cl-pgloader through sbcl --eval. 2018-07-03 22:49:27 +02:00
Christoph Berg
647bf4cb86 debian/rules: invoke help2man without path 2018-07-03 22:22:01 +02:00
Christoph Berg
d46c3b8c59 debian/rules: Properly format buildapp invocation 2018-07-03 20:16:29 +02:00
Christoph Berg
bba850479b debian: Skip building and manpage generation in arch-indep builds. 2018-07-03 20:13:15 +02:00
Christoph Berg
ded148228d debian: Install pgloader.asd into correct location. (Closes: #857226) 2018-07-03 18:48:04 +02:00
Christoph Berg
4f5e426fc7 debian: #864309 was fixed in 3.5.2-1 2018-07-03 18:27:51 +02:00
Christoph Berg
8263e587f0 debian/source/options: Ignore changes in src/params.lisp (release vs non-release). debian/3.5.2-1 2018-07-03 17:17:28 +02:00
Christoph Berg
906fd96bf1 debian: Build manpage using help2man. 2018-07-03 17:13:35 +02:00
Christoph Berg
b4fae61d41 debian/copyright: syntax fixups 2018-07-03 17:13:35 +02:00
Dimitri Fontaine
8537bd661f Back to not being a release.
Maybe I should find a way to avoid this extra back-and-forth commit.
Someday.
2018-07-03 17:11:38 +02:00
Dimitri Fontaine
63af7e7373 Release 3.5.2.
This release fixes debian packaging, includes support for Redhift as a
target, and also fixes some bugs.
v3.5.2
2018-07-03 16:58:55 +02:00
Christoph Berg
cb528c2e19 All included test data has been verified as free, stop building a +dfsg tarball. 2018-07-03 16:37:43 +02:00
Christoph Berg
f19e301c81 debian: Build sphinx docs
While we are at it, remove built docs on clean
2018-06-25 15:02:32 +02:00
Christoph Berg
7a974d712e docs: Remove sidebar_collapse: false
Sphinx's alabaster module on Debian stretch doesn't support
sidebar_collapse yet; remove the setting so the docs build everywhere
2018-06-25 14:48:29 +02:00
Christoph Berg
a1d42028a3 Build and install new sphinx docs instead. 2018-06-25 12:47:20 +02:00
Dimitri Fontaine
9661c5874d Fix previous patch.
It's easy to avoid having the warning about unused lexical variable with the
proper declaration, that I failed to install before because of a syntax
error when I tried. Let's fix it now that I realise what was wrong.
2018-06-23 00:50:35 +02:00
Dimitri Fontaine
8930734bea Ensure unquoted file names for logs and data.
The previous code could create files having as an example the following,
unhelpful name: \"errors\"/\"err\".\"errors\".log.

Fix #808.
2018-06-22 23:02:07 +02:00
Christoph Berg
ee44f19815 debian: Enable SSL in src/hooks.lisp. 2018-06-22 14:35:59 +02:00
Christoph Berg
2160d0abb2 debian: force SSL usage in test via PGSSLMODE 2018-06-22 14:25:12 +02:00
Dimitri Fontaine
047cf84341 Add support for PGSSLMODE environment variable.
PostgreSQL supports many environment variable to drive its connection
behavior, as documented at the following reference:

  https://www.postgresql.org/docs/current/static/libpq-envars.html

We don't yet support everything, adding them one piece at a time.
2018-06-22 14:13:15 +02:00
Christoph Berg
7b4821e26c debian: Depend on the libssl version cl-plus-ssl depends on. 2018-06-22 10:55:16 +02:00
Christoph Berg
eaf3370a16 debian/rules: remove orig target 2018-06-22 10:30:32 +02:00
Christoph Berg
ae26ca5c1d debian: remove debian/home on clean 2018-06-22 10:15:20 +02:00
Christoph Berg
12af803612 debian: test installed pgloader binary 2018-06-22 10:13:32 +02:00
Christoph Berg
20e5b0bf2a debian/tests: Depend on postgresql, and run test as root
Prepare to test SSL connections, but do not exercise the test yet,
cl-plus-ssl is still broken.
2018-06-21 15:36:52 +02:00
Dimitri Fontaine
7d8ac3b352 Reproduce a test case from issue #795. 2018-06-15 22:14:04 +02:00
Dimitri Fontaine
a0bac47101 Refrain from TRUNCAT'ing an empty list of tables.
Fixed #789.
2018-06-15 17:46:31 +02:00
Dimitri Fontaine
8c2cda75e5 Allow more punctuation signs in the parsers: dollar and percent.
For some reasons some people might use those in their connection strings, as
part of a username or such.

Fixes #809.
2018-06-15 17:26:51 +02:00
Christoph Berg
7220fc2038 debian: Add watch file. 2018-06-04 12:58:35 +02:00
Christoph Berg
0f1da26a27 Run only allcols.load test for now 2018-06-04 12:52:30 +02:00
Christoph Berg
30f90cb848 test/Makefile: Allow configuring the superuser database name
Also, don't ignore errors while setting up the database
2018-06-04 10:52:14 +02:00
Dimitri Fontaine
dfedce2aba Fix support for discovery of DBF target table name.
When the LOAD command does not provide the name of the target table for a
DBF source, we can get the name of the table from the DBF file itself. That
feature got broken, here's a fix.

Fix #805.
2018-06-01 11:23:51 -04:00
Christoph Berg
4cd26c09fd Add new B-D cl-zs3 2018-05-27 21:37:06 +02:00
Björn Häuser
ad7ce4a66b Fix documentation for binary datatype changes (#801)
When reading http://pgloader.readthedocs.io/en/latest/ref/mysql.html I came across the section of binary. On the documentation the indentation is off and is kinda hard to read :)
2018-05-26 13:54:28 +02:00
Dimitri Fontaine
bcf9cf9bf4 Redshift doesn't have support for the COPY format.
Instead, it needs to parse CSV files. On the other hand, as we don't have to
implement the COPY protocol from within pgloader for Redshift (because it's
using S3 as the data source, and not STDIN), we don't need the level of
control that we are using when talking to a normal PostgreSQL.
2018-05-23 13:45:16 +02:00
Dimitri Fontaine
3db3ecf81b Review Redshift data type dumb-down choices.
It's a little more involved that what was done previously. In particular we
need to pay attention to MySQL varchar(x) and transform them into something
big enough when counting bytes rather than chars, like varchar(3x).

Then there's the "text" datatype to take into account, and some more.
2018-05-23 13:43:28 +02:00
Dimitri Fontaine
05b4c7c978 Fix default MySQL casting rules for on update current timestamp.
Due to how type casting matching is implemented in pgloader, we need to add
two more MySQL casting rules in the default pgloader set to handle
specically the case when a datetime or timestamp column in MySQL has the
"extra" bit of information "on update current timestamp".

That's because for a casting rule to match, both the type definition and the
casting rule must have the :on-update-current-timestamp property positionned
the same, so that the existing default rules would not apply.
2018-05-23 10:34:34 +02:00
Dimitri Fontaine
9ac400b623 Implement copying data through S3 for Redshift.
Also add some schema-level support by disabling our usual index and
constraint support when the target is Redshift, because it doesn't support
those parts of SQL.

The S3 parameters are read form either the process environment variables or
from the AWS configuration files in ~/.aws.
2018-05-21 21:22:15 +02:00
Dimitri Fontaine
d4dc4499a8 Add schema migration support for Redshift as a target.
Redshift looks like a very old PostgreSQL (8.0.2) with some extra features
and a very limited selection of data types. In this patch we parse the
PostgreSQL version() function output and automatically determine if we're
connected to Redshift.

When connected to Redshift, we then dumb-down our target catalogs to the
subset of data types that Redshift actually does support.

Also, some catalog queries can't be done in Redshift, and 8.0 didn't have
fully compliant VALUES statement, so we use a temporary table in places
where we used to use SELECT ... FROM (VALUES(...)) in pgloader.

COPYing data to Redshift isn't possible with just this set of changes,
because Redshift also don't support the COPY FROM STDIN form. COPY sources
are limited, and another patch will have to be cooked to prepare the data
from pgloader into a format and location that Redshift knows how to handle.

At least, it's possible to migrate a database schema to Redshift already.
2018-05-19 19:16:58 +02:00
Dimitri Fontaine
8fce6c84fc Move all typemod functions at the same place.
Having the parse-column-typemod function in the pgloader.transforms package
makes it available from everywhere in the pgloader code base.
2018-05-19 19:15:30 +02:00
Dimitri Fontaine
1f354131d0 Release pgloader 3.5.1.
Lots of bug fixes did happen, time to release.
v3.5.1
2018-05-17 10:41:40 +02:00
Dimitri Fontaine
f30f596eca Review bundle and regression test facilities.
Some path computation didn't work when trying to regression test the
produced bundle.

Also, the bundle building steps would use the pgloader system definition and
dependencies from what's currently available in Quicklisp rather than from
the local pgloader.asd being built.
2018-05-17 10:39:32 +02:00
Dimitri Fontaine
1fe835d31b Add sample data for fields escaped by double-quote.
See #787.
2018-04-29 19:05:52 +02:00
Dimitri Fontaine
a392328dad Allow any ordering of guards and extra cast rule clauses.
It used to be that extra were forced to being parsed before guards, but
there's no reason why a user wouldn't think to write its clauses the other
way round, so add support for that as well.

See #779.
2018-04-29 19:00:20 +02:00
Dimitri Fontaine
01f877bad7 Testing a change in the way we load CL+SSL.
Apparently cl+ssl needs to be reloaded a very specific way at image startup
time, and provides a function to do just that. Let's try and use this piece
of magic rather cffi:load-foreign-library directly.
2018-04-16 15:46:16 +02:00
Dimitri Fontaine
cb9e01f4d9 Code review for previous commit.
See #771.
2018-03-27 14:55:31 +02:00
Goo
c6271506ab Add a new transformation function: hex-to-dec
Closes #771
2018-03-27 14:51:34 +02:00
Dimitri Fontaine
792c0d0357 Typo fix in docs about concurrency settings. 2018-03-26 14:05:05 +02:00
Dimitri Fontaine
e4dca1a086 Implement support for MySQL useSSL=true|false option.
The MySQL connection string parameter for SSL usage is useSSL, so map an
option name to our expected values for sslmode in database connection
strings.

See #748.
2018-03-16 16:41:40 +01:00