Skip to content

Commit ff33ec5

Browse files
authored
Improve README and add proper INSTALL docs. (#1417)
1 parent fac03a6 commit ff33ec5

File tree

4 files changed

+263
-144
lines changed

4 files changed

+263
-144
lines changed

README.md

Lines changed: 47 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![Build Status](https://travis-ci.org/dimitri/pgloader.svg?branch=master)](https://travis-ci.org/dimitri/pgloader)
44
[![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)
65
[![Read The Docs Status](https://readthedocs.org/projects/pgloader/badge/?version=latest&style=plastic)](http://pgloader.readthedocs.io/en/latest/)
76

87
pgloader is a data loading tool for PostgreSQL, using the `COPY` command.
@@ -21,147 +20,43 @@ being the transformation of MySQL datestamps `0000-00-00` and
2120
`0000-00-00 00:00:00` to PostgreSQL `NULL` value (because our calendar
2221
never had a *year zero*).
2322

24-
## Versioning
25-
26-
pgloader version 1.x is quite old and was developed in `TCL`.
27-
When faced with maintaining that code, the new emerging development
28-
team (hi!) picked `python` instead because that made sense at the
29-
time. So pgloader version 2.x was written in python.
30-
31-
The current version of pgloader is the 3.x series, which is written in
32-
[Common Lisp](http://cliki.net/) for better development flexibility,
33-
runtime performance, and support of real threading.
34-
35-
The versioning is now following the Emacs model, where any X.0 release
36-
number means you're using a development version (alpha, beta, or release
37-
candidate). The next stable versions are going to be `3.1` then `3.2` etc.
38-
39-
When using a development snapshot rather than a released version the version
40-
number includes the git hash (in its abbreviated form):
41-
42-
- `pgloader version "3.0.99"`
43-
44-
Release candidate 9 for pgloader version 3.1, with a *git tag* named
45-
`v3.0.99` so that it's easy to checkout the same sources as the
46-
released code.
47-
48-
- `pgloader version "3.0.fecae2c"`
49-
50-
Development snapshot again *git hash* `fecae2c`. It's possible to have
51-
the same sources on another setup with using the git command `git
52-
checkout fecae2c`.
53-
54-
- `pgloader version "3.1.0"`
55-
56-
Stable release.
57-
58-
## LICENCE
59-
60-
pgloader is available under [The PostgreSQL Licence](http://www.postgresql.org/about/licence/).
61-
62-
## INSTALL
63-
64-
You can install pgloader directly from
65-
[apt.postgresql.org](https://wiki.postgresql.org/wiki/Apt) and from official
66-
debian repositories, see
67-
[packages.debian.org/pgloader](https://packages.debian.org/search?keywords=pgloader).
68-
69-
$ apt-get install pgloader
70-
71-
You can also use a **docker** image for pgloader at
72-
<https://hub.docker.com/r/dimitri/pgloader/>:
73-
74-
$ docker pull dimitri/pgloader
75-
$ docker run --rm --name pgloader dimitri/pgloader:latest pgloader --version
76-
$ docker run --rm --name pgloader dimitri/pgloader:latest pgloader --help
77-
78-
## Build from sources
79-
80-
pgloader is now a Common Lisp program, tested using the
81-
[SBCL](http://sbcl.org/) (>= 1.2.5) and
82-
[Clozure CL](http://ccl.clozure.com/) implementations with
83-
[Quicklisp](http://www.quicklisp.org/beta/).
84-
85-
When building from sources, you should always build from the current git
86-
`HEAD` as it's basically the only source that is managed in a way to ensure
87-
it builds aginst current set of dependencies versions.
88-
89-
### Building from sources on debian
90-
91-
$ apt-get install sbcl unzip libsqlite3-dev make curl gawk freetds-dev libzip-dev
92-
$ cd /path/to/pgloader
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)
99-
100-
### Building from sources on macOS
101-
102-
When using [brew](https://brew.sh), it should be a simple `brew install
103-
--HEAD pgloader`.
104-
105-
When using [macports](https://www.macports.org), then we have a situation to
106-
deal with with shared objects pgloader depends on, as reported in issue #161
107-
at <https://github.com/dimitri/pgloader/issues/161#issuecomment-201162647>:
108-
109-
> I was able to get a clean build without having to disable compression after
110-
> symlinking /usr/local/lib to /opt/local/lib. Note that I did not have
111-
> anything installed to /usr/local/lib so I didn't lose anything here.
112-
113-
### Building from sources on Windows
114-
115-
Building pgloader on Windows is supported, thanks to Common Lisp
116-
implementations being available on that platform, and to the Common Lisp
117-
Standard for making it easy to write actually portable code.
118-
119-
It is recommended to have a look at the issues labelled with *Windows
120-
support* if you run into trouble when building
121-
pgloader:
122-
123-
<https://github.com/dimitri/pgloader/issues?utf8=✓&q=label%3A%22Windows%20support%22%20>
124-
125-
### Building Docker image from sources
126-
127-
You can build a Docker image from source using SBCL by default:
128-
129-
$ docker build .
130-
131-
Or Clozure CL (CCL):
132-
133-
$ docker build -f Dockerfile.ccl .
134-
135-
## More options when building from source
136-
137-
The `Makefile` target `pgloader` knows how to produce a Self Contained
138-
Binary file for pgloader, found at `./build/bin/pgloader`:
139-
140-
$ make pgloader
141-
142-
By default, the `Makefile` uses [SBCL](http://sbcl.org/) to compile your
143-
binary image, though it's possible to build using
144-
[CCL](http://ccl.clozure.com/).
145-
146-
$ make CL=ccl pgloader
147-
148-
If using `SBCL` and it supports core compression, the make process will
149-
use it to generate a smaller binary. To force disabling core
150-
compression, you may use:
151-
152-
$ make COMPRESS_CORE=no pgloader
153-
154-
The `--compress-core` is unique to SBCL, so not used when `CC` is different
155-
from the `sbcl` value.
156-
157-
You can also tweak the default amount of memory that the `pgloader` image
158-
will allow itself using when running through your data (don't ask for more
159-
than your current RAM tho):
160-
161-
$ make DYNSIZE=8192 pgloader
162-
163-
The `make pgloader` command when successful outputs a `./build/bin/pgloader`
164-
file for you to use.
23+
## Documentation
24+
25+
Full documentation is available online, including manual pages of all the
26+
pgcopydb sub-commands. Check out
27+
[https://pgcopydb.readthedocs.io/](https://pgcopydb.readthedocs.io/en/latest/).
28+
29+
```
30+
$ pgloader --help
31+
pgloader [ option ... ] SOURCE TARGET
32+
--help -h boolean Show usage and exit.
33+
--version -V boolean Displays pgloader version and exit.
34+
--quiet -q boolean Be quiet
35+
--verbose -v boolean Be verbose
36+
--debug -d boolean Display debug level information.
37+
--client-min-messages string Filter logs seen at the console (default: "warning")
38+
--log-min-messages string Filter logs seen in the logfile (default: "notice")
39+
--summary -S string Filename where to copy the summary
40+
--root-dir -D string Output root directory. (default: #P"/tmp/pgloader/")
41+
--upgrade-config -U boolean Output the command(s) corresponding to .conf file for v2.x
42+
--list-encodings -E boolean List pgloader known encodings and exit.
43+
--logfile -L string Filename where to send the logs.
44+
--load-lisp-file -l string Read user code from files
45+
--dry-run boolean Only check database connections, don't load anything.
46+
--on-error-stop boolean Refrain from handling errors properly.
47+
--no-ssl-cert-verification boolean Instruct OpenSSL to bypass verifying certificates.
48+
--context -C string Command Context Variables
49+
--with string Load options
50+
--set string PostgreSQL options
51+
--field string Source file fields specification
52+
--cast string Specific cast rules
53+
--type string Force input source type
54+
--encoding string Source expected encoding
55+
--before string SQL script to run before loading the data
56+
--after string SQL script to run after loading the data
57+
--self-upgrade string Path to pgloader newer sources
58+
--regress boolean Drive regression testing
59+
```
16560

16661
## Usage
16762

@@ -183,3 +78,13 @@ indexes, foreign keys, comments) and parallel loading of the corrected data:
18378

18479
$ createdb pagila
18580
$ pgloader mysql://user@localhost/sakila postgresql:///pagila
81+
82+
## LICENCE
83+
84+
pgloader is available under [The PostgreSQL
85+
Licence](http://www.postgresql.org/about/licence/).
86+
87+
## INSTALL
88+
89+
Please see full documentation at
90+
[https://pgloader.readthedocs.io/](https://pgloader.readthedocs.io/en/latest/install.html).

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = '3.4'
58+
version = '3.6'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '3.4.1'
60+
release = '3.6.3'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ implement the third step in a fully automated way. That's pgloader.
244244
intro
245245
quickstart
246246
tutorial/tutorial
247+
install
247248
pgloader
248249
ref/csv
249250
ref/fixed

0 commit comments

Comments
 (0)