ports/124210: New port: databases/pgloader : PostgreSQL Loader

Pierre-Emmanuel André pea at raveland.org
Mon Jun 2 15:10:01 UTC 2008


>Number:         124210
>Category:       ports
>Synopsis:       New port: databases/pgloader : PostgreSQL Loader
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 02 15:10:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pierre-Emmanuel André
>Release:        FreeBSD 7.0 RELEASE
>Organization:
>Environment:
FreeBSD bsd.local 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008     root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
New port: databases/pgloader
pgloader imports data from a flat file and insert it into a PostgreSQL database
table. 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.

Homepage: http://pgfoundry.org/projects/pgloader/
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/mystuff/database/pgloader/
#	/usr/ports/mystuff/database/pgloader/pkg-descr
#	/usr/ports/mystuff/database/pgloader/Makefile
#	/usr/ports/mystuff/database/pgloader/pkg-plist
#	/usr/ports/mystuff/database/pgloader/distinfo
#
echo c - /usr/ports/mystuff/database/pgloader/
mkdir -p /usr/ports/mystuff/database/pgloader/ > /dev/null 2>&1
echo x - /usr/ports/mystuff/database/pgloader/pkg-descr
sed 's/^X//' >/usr/ports/mystuff/database/pgloader/pkg-descr << 'END-of-/usr/ports/mystuff/database/pgloader/pkg-descr'
Xpgloader imports data from a flat file and inserts it into one or
Xmore PostgreSQL database tables. It uses a flat file per database
Xtable, and you can configure as many Sections as you want, each one
Xassociating a table name and a data file.
X
XData are parsed and rewritten, then given to PostgreSQL COPY command.
XParsing is necessary for dealing with end of lines and eventual trailing
Xseparator characters, and for column reordering: your flat data file may
Xnot have the same column order as the database table has.
X
Xpgloader is also able to load some large objects data into PostgreSQL,
Xas of now only Informix UNLOAD data files are supported. This command
Xgives large objects data location information into the main data file.
Xpgloader parse it add the text or bytea content properly escaped to the
XCOPY data.
X
Xpgloader issues some timing statistics every "commit_every" commits. At 
Xthe end of processing each section, a summary of overall operations, 
Xnumbers of rows copied and commits, time it took in seconds, errors 
Xlogged and database errors is issued.
X
XWWW:	http://pgfoundry.org/projects/pgloader/
END-of-/usr/ports/mystuff/database/pgloader/pkg-descr
echo x - /usr/ports/mystuff/database/pgloader/Makefile
sed 's/^X//' >/usr/ports/mystuff/database/pgloader/Makefile << 'END-of-/usr/ports/mystuff/database/pgloader/Makefile'
X# New ports collection makefile for:	pgloader
X# Date created:		2008-06-02
X# Whom:			Pierre-Emmanuel Andre
X#
X# $FreeBSD$
X#
X
XPORTNAME=	pgloader
XPORTVERSION=	2.3.0
XCATEGORIES=	databases
XMASTER_SITES=	http://pgfoundry.org/frs/download.php/1679/
X
XMAINTAINER=	pea at raveland.org
XCOMMENT=	Import CSV data and Large Object to PostgreSQL
X
XMAN1=		pgloader.1
X
XNO_BUILD=	Yes
XUSE_PYTHON=	2.4+
X
XRUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/psycopg2/__init__.py:${PORTSDIR}/databases/py-psycopg2
X
Xpre-configure:
X	${REINPLACE_CMD} -e 's,/usr/share/python-support,${PYTHON_SITELIBDIR},' ${WRKSRC}/pgloader/options.py
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/pgloader.py ${PREFIX}/bin/pgloader
X	${INSTALL_MAN} ${WRKSRC}/pgloader.1 ${MAN1PREFIX}/man/man1
X	${MKDIR} ${PYTHON_SITELIBDIR}/pgloader
X	@cd ${WRKSRC}/pgloader && ${COPYTREE_SHARE} \* ${PYTHON_SITELIBDIR}/pgloader/
X	${MKDIR} ${PYTHON_SITELIBDIR}/pgloader/reformat
X	@cd ${WRKSRC}/reformat && ${COPYTREE_SHARE} \* ${PYTHON_SITELIBDIR}/pgloader/reformat/
X.if !defined(NOPORTEXAMPLES)
X	${MKDIR} ${EXAMPLESDIR}
X	@cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}
X.endif
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/BUGS.txt ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/TODO.txt ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/pgloader.1.txt ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-/usr/ports/mystuff/database/pgloader/Makefile
echo x - /usr/ports/mystuff/database/pgloader/pkg-plist
sed 's/^X//' >/usr/ports/mystuff/database/pgloader/pkg-plist << 'END-of-/usr/ports/mystuff/database/pgloader/pkg-plist'
Xbin/pgloader
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/__init__.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/csvreader.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/db.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/lo.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/logger.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/options.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/options.py.bak
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/pgloader.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/reader.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/textreader.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/tools.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/reformat/README
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/reformat/__init__.py
Xlib/%%PYTHON_VERSION%%/site-packages/pgloader/reformat/mysql.py
X%%PORTDOCS%%%%DOCSDIR%%/BUGS.txt
X%%PORTDOCS%%%%DOCSDIR%%/TODO.txt
X%%PORTDOCS%%%%DOCSDIR%%/pgloader.1.txt
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/allcols/allcols.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/allcols/allcols.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clob/clob.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clob/clob.out 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clob/clob.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cluttered/cluttered.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cluttered/cluttered.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csv/csv.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csv/csv.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errors/errors.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errors/errors.sql
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parallel.conf
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parallel/parallel.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parallel/parallel.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/partial/partial.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/partial/partial.sql
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgloader.conf
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reformat/reformat.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reformat/reformat.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/serial/serial.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/serial/serial.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/simple.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple/simple.sql 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udc/udc.data 
X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/udc/udc.sql
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/udc
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/simple
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/serial
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/reformat
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/partial
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/parallel
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/errors
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/csv
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/cluttered
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/clob
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/allcols
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
X at dirrm lib/%%PYTHON_VERSION%%/site-packages/pgloader/reformat
X at dirrm lib/%%PYTHON_VERSION%%/site-packages/pgloader
END-of-/usr/ports/mystuff/database/pgloader/pkg-plist
echo x - /usr/ports/mystuff/database/pgloader/distinfo
sed 's/^X//' >/usr/ports/mystuff/database/pgloader/distinfo << 'END-of-/usr/ports/mystuff/database/pgloader/distinfo'
XMD5 (pgloader-2.3.0.tar.gz) = d4637c23f2cbefb30625751081f6a1c4
XSHA256 (pgloader-2.3.0.tar.gz) = cc2a7570f6c908f740fd5b53d5c1b51a9d93ab223232df90ec01e874e18c1b1d
XSIZE (pgloader-2.3.0.tar.gz) = 83945
END-of-/usr/ports/mystuff/database/pgloader/distinfo
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list