Skip to content

Commit f8ef9c2

Browse files
committed
Merge tag 'v3.6.2' into debian
2 parents a6df4e9 + 484d3e1 commit f8ef9c2

File tree

97 files changed

+1954
-1067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1954
-1067
lines changed

.travis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ lisp_install() {
1515
;;
1616

1717
sbcl)
18-
sbcl_checksum='eb44d9efb4389f71c05af0327bab7cd18f8bb221fb13a6e458477a9194853958'
19-
sbcl_version='1.3.18'
18+
sbcl_checksum='22ccd9409b2ea16d4be69235c5ad5fde833452955cb24483815312d3b1d7401c'
19+
sbcl_version='1.5.2'
2020

2121
remote_file "/tmp/sbcl-${sbcl_version}.tgz" "http://prdownloads.sourceforge.net/sbcl/sbcl-${sbcl_version}-x86-64-linux-binary.tar.bz2" "$sbcl_checksum"
2222
tar --file "/tmp/sbcl-${sbcl_version}.tgz" --extract --directory '/tmp'

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ before_script:
2121
- PGUSER=pgloader psql -d pgloader -c "create schema expected;"
2222
- PGUSER=pgloader psql -d pgloader -c "create schema err;"
2323
- make --version
24-
- make "CL=$LISP"
24+
- make "CL=$LISP" clones save
2525

2626
script:
27-
- PGUSER=pgloader make "CL=$LISP" check
27+
- PGUSER=pgloader make "CL=$LISP" check-saved
2828

2929
notifications:
3030
email:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ FROM debian:stable-slim as builder
2626

2727
RUN mkdir -p /opt/src/pgloader/build/bin \
2828
&& cd /opt/src/pgloader \
29-
&& make
29+
&& make clones save
3030

3131
FROM debian:stable-slim
3232

Dockerfile.ccl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ FROM debian:stable-slim as builder
1414
make \
1515
openssl \
1616
patch \
17-
sbcl \
1817
time \
1918
unzip \
2019
wget \
@@ -30,7 +29,7 @@ FROM debian:stable-slim as builder
3029

3130
RUN mkdir -p /opt/src/pgloader/build/bin \
3231
&& cd /opt/src/pgloader \
33-
&& make CL=ccl DYNSIZE=256
32+
&& make CL=ccl DYNSIZE=256 clones save
3433

3534
FROM debian:stable-slim
3635

@@ -40,6 +39,7 @@ FROM debian:stable-slim
4039
freetds-dev \
4140
gawk \
4241
libsqlite3-dev \
42+
libssl1.1 \
4343
libzip-dev \
4444
make \
4545
sbcl \

INSTALL.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,45 @@ about how to backport a recent enough SBCL here (1.2.5 or newer).
2727

2828
### Redhat / CentOS
2929

30-
You will need to install the Steel Bank Common Lisp package (sbcl) from EPEL, as
31-
well as the freetds-devel package for some shared libraries. With RHEL/CentOS 6,
32-
if the packaged version isn't >=1.3.6, you'll need to build it from source. With
33-
v7, after installing freetds, you also need to create a softlink from the versioned
34-
shared library `libsybdb.so.5` to `libsybdb.so`.
35-
36-
The above steps are prepared for you with `boostrap-centos.sh` and `bootstrap-centos7.sh` respectively.
37-
Please report to us if your standard RHEL/CentOS installation required additional steps.
30+
To build and install pgloader the Steel Bank Common Lisp package (sbcl) from EPEL,
31+
and the freetds packages are required.
32+
33+
With RHEL/CentOS 6, if the packaged version of sbcl isn't >=1.3.6, you'll need
34+
to build it from source.
35+
36+
It is recommended to build the RPM yourself, see below, to ensure that all installed
37+
files are properly tracked and that you can safely update to newer versions of
38+
pgloader as they're released.
39+
40+
To do an adhoc build and install run `boostrap-centos.sh` for CentOS 6 or
41+
`bootstrap-centos7.sh` for CentOS 7 to install the required dependencies.
42+
[Build pgloader](INSTALL.md#building-pgloader).
43+
44+
#### rpmbuild
45+
46+
The spec file in the root of the pgloader repository can be used to build your
47+
own RPM. For production deployments it is recommended that you build this RPM on
48+
a dedicated build box and then copy the RPM to your production environment for
49+
use; it is considered bad practice to have compilers and build tools present in
50+
production environments.
51+
52+
1. Install the [EPEL repo](https://fedoraproject.org/wiki/EPEL#Quickstart).
53+
54+
1. Install rpmbuild dependencies:
55+
56+
sudo yum -y install yum-utils rpmdevtools @"Development Tools"
57+
58+
1. Install pgloader build dependencies:
59+
60+
sudo yum-builddep pgloader.spec
61+
62+
1. Download pgloader source:
63+
64+
spectool -g -R pgloader.spec
65+
66+
1. Build the source and binary RPMs (see `rpmbuild --help` for other build options):
67+
68+
rpmbuild -ba pgloader.spec
3869

3970
### Mac OS X
4071

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pgloader build tool
22
APP_NAME = pgloader
3-
VERSION = 3.6.1
3+
VERSION = 3.6.2
44

55
# use either sbcl or ccl
66
CL = sbcl
@@ -24,7 +24,7 @@ QLDIR = $(BUILDDIR)/quicklisp
2424
MANIFEST = $(BUILDDIR)/manifest.ql
2525
LATEST = $(BUILDDIR)/pgloader-latest.tgz
2626

27-
BUNDLEDIST = 2019-01-07
27+
BUNDLEDIST = 2020-02-18
2828
BUNDLENAME = pgloader-bundle-$(VERSION)
2929
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
3030
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
@@ -103,7 +103,6 @@ $(LIBS): $(QLDIR)/setup.lisp
103103
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
104104
--eval '(push :pgloader-image *features*)' \
105105
--eval '(setf *print-circle* t *print-pretty* t)' \
106-
--eval '(ql:quickload "pgloader")' \
107106
--eval '(push "$(PWD)/" ql:*local-project-directories*)' \
108107
--eval '(ql:quickload "pgloader")' \
109108
--eval '(quit)'
@@ -173,7 +172,7 @@ test: $(PGLOADER)
173172
save: ./src/save.lisp $(LISP_SRC)
174173
$(CL) $(CL_OPTS) --load ./src/save.lisp
175174

176-
check-saved: save
175+
check-saved:
177176
$(MAKE) PGLOADER=$(realpath $(PGLOADER)) CL=$(CL) -C test regress
178177

179178
clean-bundle:

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# PGLoader
22

33
[![Build Status](https://travis-ci.org/dimitri/pgloader.svg?branch=master)](https://travis-ci.org/dimitri/pgloader)
4-
54
[![Join the chat at https://gitter.im/dimitri/pgloader](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dimitri/pgloader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
[![Docker Build Status](https://img.shields.io/docker/cloud/build/dimitri/pgloader.svg)](https://cloud.docker.com/repository/docker/dimitri/pgloader)
6+
[![Read The Docs Status](https://readthedocs.org/projects/pgloader/badge/?version=latest&style=plastic)](http://pgloader.readthedocs.io/en/latest/)
67

78
pgloader is a data loading tool for PostgreSQL, using the `COPY` command.
89

@@ -89,8 +90,12 @@ it builds aginst current set of dependencies versions.
8990

9091
$ apt-get install sbcl unzip libsqlite3-dev make curl gawk freetds-dev libzip-dev
9192
$ cd /path/to/pgloader
92-
$ make pgloader
93-
$ ./build/bin/pgloader --help
93+
$ make pgloader
94+
$ ./build/bin/pgloader --help
95+
96+
### Building from sources on RedHat/CentOS
97+
98+
See "Redhat / CentOS" in [INSTALL.md](INSTALL.md#redhat--centos)
9499

95100
### Building from sources on macOS
96101

@@ -178,9 +183,3 @@ indexes, foreign keys, comments) and parallel loading of the corrected data:
178183

179184
$ createdb pagila
180185
$ pgloader mysql://user@localhost/sakila postgresql:///pagila
181-
182-
See the documentation file `pgloader.1.md` for details. You can compile that
183-
file into a manual page or an HTML page thanks to the `ronn` application:
184-
185-
$ apt-get install ruby-ronn
186-
$ make docs

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Schema only, Data only
147147

148148
Repeatable (DROP+CREATE)
149149
By default, pgloader issues DROP statements in the target PostgreSQL
150-
database before issing any CREATE statement, so that you can repeat the
150+
database before issuing any CREATE statement, so that you can repeat the
151151
migration as many times as necessary until migration specifications and
152152
rules are bug free.
153153

docs/ref/dbf.rst

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
Loading DBF data
22
=================
33

4-
This command instructs pgloader to load data from a `DBF` file. Here's an
5-
example::
4+
This command instructs pgloader to load data from a `DBF` file. A default
5+
set of casting rules are provided and might be overloaded and appended to by
6+
the command.
7+
8+
Here's an example with a remote HTTP source and some user defined casting
9+
rules::
610

711
LOAD DBF
812
FROM http://www.insee.fr/fr/methodes/nomenclatures/cog/telechargement/2013/dbf/reg2013.dbf
913
INTO postgresql://user@localhost/dbname
10-
WITH truncate, create table;
14+
WITH truncate, create table
15+
CAST column reg2013.region to integer,
16+
column reg2013.tncc to smallint;
1117

1218
The `dbf` format command accepts the following clauses and options.
1319

@@ -51,3 +57,16 @@ When loading from a `DBF` file, the following options are supported:
5157

5258
This options expects as its value the possibly qualified name of the
5359
table to create.
60+
61+
Default DB3 Casting Rules
62+
-------------------------
63+
64+
When migrating from DB3 the following Casting Rules are provided::
65+
66+
type C to text using db3-trim-string
67+
type M to text using db3-trim-string
68+
type N to numeric using db3-numeric-to-pgsql-integer
69+
type I to numeric using db3-numeric-to-pgsql-numeric
70+
type L to boolean using logical-to-boolean
71+
type D to date using db3-date-to-pgsql-date
72+

docs/ref/mysql.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ MySQL Database Migration Options: WITH
103103
--------------------------------------
104104

105105
When loading from a `MySQL` database, the following options are supported,
106-
and the default *WITH* clause is: *no truncate*, *create schema*, *create
106+
and the default *WITH* clause is: *no truncate*, *create
107107
tables*, *include drop*, *create indexes*, *reset sequences*, *foreign
108108
keys*, *downcase identifiers*, *uniquify index names*.
109109

@@ -567,6 +567,12 @@ Numbers::
567567

568568
type tinyint to boolean when (= 1 precision) using tinyint-to-boolean
569569

570+
type bit when (= 1 precision) to boolean drop typemod using bits-to-boolean
571+
type bit to bit drop typemod using bits-to-hex-bitstring
572+
573+
type bigint when signed to bigint drop typemod
574+
type bigint when (< 19 precision) to numeric drop typemod
575+
570576
type tinyint when unsigned to smallint drop typemod
571577
type smallint when unsigned to integer drop typemod
572578
type mediumint when unsigned to integer drop typemod
@@ -595,12 +601,12 @@ Texts::
595601

596602
Binary::
597603

598-
type binary to bytea
599-
type varbinary to bytea
600-
type tinyblob to bytea
601-
type blob to bytea
602-
type mediumblob to bytea
603-
type longblob to bytea
604+
type binary to bytea using byte-vecotr-to-bytea
605+
type varbinary to bytea using byte-vecotr-to-bytea
606+
type tinyblob to bytea using byte-vecotr-to-bytea
607+
type blob to bytea using byte-vecotr-to-bytea
608+
type mediumblob to bytea using byte-vecotr-to-bytea
609+
type longblob to bytea using byte-vecotr-to-bytea
604610

605611
Date::
606612
@@ -638,7 +644,9 @@ Date::
638644

639645
Geometric::
640646

641-
type point to point using pgloader.transforms::convert-mysql-point
647+
type geometry to point using convert-mysql-point
648+
type point to point using convert-mysql-point
649+
type linestring to path using convert-mysql-linestring
642650

643651
Enum types are declared inline in MySQL and separately with a `CREATE TYPE`
644652
command in PostgreSQL, so each column of Enum Type is converted to a type

docs/ref/pgsql-redshift.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Redshift database by parsing the output of the `SELECT version()` SQL query.
88
Redhift as a data source
99
^^^^^^^^^^^^^^^^^^^^^^^^
1010

11-
Redshit is a variant of PostgreSQL version 8.0.2, which allows pgloader to
11+
Redshift is a variant of PostgreSQL version 8.0.2, which allows pgloader to
1212
work with only a very small amount of adaptation in the catalog queries
1313
used. In other words, migrating from Redshift to PostgreSQL works just the
1414
same as when migrating from a PostgreSQL data source, including the

pgloader.asd

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
((:file "api")
120120
(:file "methods")
121121
(:file "md-methods")
122+
(:file "matviews")
122123
(:file "casting-rules")
123124
(:file "files-and-pathnames")
124125
(:file "project-fields")))
@@ -130,22 +131,32 @@
130131
;; (:file "csv-database")
131132
(:file "csv")))
132133

133-
(:file "fixed"
134-
:depends-on ("common" "csv"))
134+
(:module "fixed"
135+
:depends-on ("common")
136+
:serial t
137+
:components
138+
((:file "fixed-guess")
139+
(:file "fixed")))
135140

136141
(:file "copy"
137142
:depends-on ("common" "csv"))
138143

139144
(:module "db3"
145+
:serial t
140146
:depends-on ("common" "csv")
141147
:components
142-
((:file "db3-schema")
143-
(:file "db3" :depends-on ("db3-schema"))))
148+
((:file "db3-cast-rules")
149+
(:file "db3-connection")
150+
(:file "db3-schema")
151+
(:file "db3")))
144152

145153
(:module "ixf"
154+
:serial t
146155
:depends-on ("common")
147156
:components
148-
((:file "ixf-schema")
157+
((:file "ixf-cast-rules")
158+
(:file "ixf-connection")
159+
(:file "ixf-schema")
149160
(:file "ixf" :depends-on ("ixf-schema"))))
150161

151162
;(:file "syslog") ; experimental...
@@ -155,6 +166,7 @@
155166
:depends-on ("common")
156167
:components
157168
((:file "sqlite-cast-rules")
169+
(:file "sqlite-connection")
158170
(:file "sqlite-schema")
159171
(:file "sqlite")))
160172

@@ -163,6 +175,7 @@
163175
:depends-on ("common")
164176
:components
165177
((:file "mssql-cast-rules")
178+
(:file "mssql-connection")
166179
(:file "mssql-schema")
167180
(:file "mssql")
168181
(:file "mssql-index-filters")))
@@ -180,7 +193,6 @@
180193
:serial t
181194
:depends-on ("common")
182195
:components ((:file "pgsql-cast-rules")
183-
(:file "pgsql-schema")
184196
(:file "pgsql")))))
185197

186198
;; package pgloader.copy

0 commit comments

Comments
 (0)