diff options
author | miwi <miwi@FreeBSD.org> | 2008-06-03 16:38:16 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2008-06-03 16:38:16 +0800 |
commit | cf0d4ddf804c7d5b58ccb28b2841531ccb084104 (patch) | |
tree | 45e67084695756f20eb2ece0d1d7f5981e0c1846 /databases/pgloader/Makefile | |
parent | f9ae02780603c5858007f53c8403076bb974aa18 (diff) | |
download | freebsd-ports-gnome-cf0d4ddf804c7d5b58ccb28b2841531ccb084104.tar.gz freebsd-ports-gnome-cf0d4ddf804c7d5b58ccb28b2841531ccb084104.tar.zst freebsd-ports-gnome-cf0d4ddf804c7d5b58ccb28b2841531ccb084104.zip |
pgloader imports data from a flat file and inserts it into one or
more PostgreSQL database tables. It uses a flat file per database
table, and you can configure as many Sections as you want, each one
associating a table name and a data file.
Data are parsed and rewritten, then given to PostgreSQL COPY command.
Parsing is necessary for dealing with end of lines and eventual trailing
separator characters, and for column reordering: your flat data file may
not have the same column order as the database table has.
pgloader is also able to load some large objects data into PostgreSQL,
as of now only Informix UNLOAD data files are supported. This command
gives large objects data location information into the main data file.
pgloader parse it add the text or bytea content properly escaped to the
COPY data.
pgloader issues some timing statistics every "commit_every" commits. At
the end of processing each section, a summary of overall operations,
numbers of rows copied and commits, time it took in seconds, errors
logged and database errors is issued.
WWW: http://pgfoundry.org/projects/pgloader/
PR: ports/124210
Submitted by: Pierre-Emmanuel Andre
Diffstat (limited to 'databases/pgloader/Makefile')
-rw-r--r-- | databases/pgloader/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/databases/pgloader/Makefile b/databases/pgloader/Makefile new file mode 100644 index 000000000000..6d866320d565 --- /dev/null +++ b/databases/pgloader/Makefile @@ -0,0 +1,44 @@ +# New ports collection makefile for: pgloader +# Date created: 2008-06-02 +# Whom: Pierre-Emmanuel Andre +# +# $FreeBSD$ +# + +PORTNAME= pgloader +PORTVERSION= 2.3.0 +CATEGORIES= databases +MASTER_SITES= http://pgfoundry.org/frs/download.php/1679/ + +MAINTAINER= pea@raveland.org +COMMENT= Import CSV data and Large Object to PostgreSQL + +MAN1= pgloader.1 + +NO_BUILD= yes +USE_PYTHON= 2.4+ + +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psycopg2/__init__.py:${PORTSDIR}/databases/py-psycopg2 + +pre-configure: + ${REINPLACE_CMD} -e 's,/usr/share/python-support,${PYTHON_SITELIBDIR},' ${WRKSRC}/pgloader/options.py + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/pgloader.py ${PREFIX}/bin/pgloader + ${INSTALL_MAN} ${WRKSRC}/pgloader.1 ${MAN1PREFIX}/man/man1 + ${MKDIR} ${PYTHON_SITELIBDIR}/pgloader + @cd ${WRKSRC}/pgloader && ${COPYTREE_SHARE} \* ${PYTHON_SITELIBDIR}/pgloader/ + ${MKDIR} ${PYTHON_SITELIBDIR}/pgloader/reformat + @cd ${WRKSRC}/reformat && ${COPYTREE_SHARE} \* ${PYTHON_SITELIBDIR}/pgloader/reformat/ +.if !defined(NOPORTEXAMPLES) + ${MKDIR} ${EXAMPLESDIR} + @cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR} +.endif +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/BUGS.txt ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/TODO.txt ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/pgloader.1.txt ${DOCSDIR} +.endif + +.include <bsd.port.mk> |