svn commit: r464904 - in head/databases: . pgsanity
Tobias Kortkamp
tobik at FreeBSD.org
Sun Mar 18 12:31:14 UTC 2018
Author: tobik
Date: Sun Mar 18 12:31:13 2018
New Revision: 464904
URL: https://svnweb.freebsd.org/changeset/ports/464904
Log:
New port: databases/pgsanity
PgSanity checks the syntax of PostgreSQL SQL files.
It does this by leveraging the ecpg command which is traditionally
used for preparing C files with embedded SQL for compilation.
However, as part of that preparation, ecpg checks the embedded SQL
statements for syntax errors using the exact same parser that is in
PostgreSQL.
So the approach that PgSanity takes is to take a file that has a list
of bare SQL in it, make that file look like a C file with embedded
SQL, run it through ecpg and let ecpg report on the syntax errors of
the SQL.
WWW: https://github.com/markdrago/pgsanity
PR: 226689
Submitted by: 0mp
Added:
head/databases/pgsanity/
head/databases/pgsanity/Makefile (contents, props changed)
head/databases/pgsanity/distinfo (contents, props changed)
head/databases/pgsanity/pkg-descr (contents, props changed)
Modified:
head/databases/Makefile
Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile Sun Mar 18 12:20:10 2018 (r464903)
+++ head/databases/Makefile Sun Mar 18 12:31:13 2018 (r464904)
@@ -601,6 +601,7 @@
SUBDIR += pgreplay
SUBDIR += pgroonga
SUBDIR += pgrouting
+ SUBDIR += pgsanity
SUBDIR += pgsphere
SUBDIR += pgtcl
SUBDIR += pgtop
Added: head/databases/pgsanity/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/pgsanity/Makefile Sun Mar 18 12:31:13 2018 (r464904)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+PORTNAME= pgsanity
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.2.8-16
+DISTVERSIONSUFFIX= -gd82a5be
+CATEGORIES= databases python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= 0mp at FreeBSD.org
+COMMENT= Check syntax of PostgreSQL SQL files
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= pgsql python
+USE_PYTHON= autoplist concurrent distutils
+
+USE_GITHUB= yes
+GH_ACCOUNT= markdrago
+
+NO_ARCH= yes
+
+OPTIONS_DEFINE= DOCS
+
+PORTDOCS= README.md
+
+do-test:
+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test)
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
Added: head/databases/pgsanity/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/pgsanity/distinfo Sun Mar 18 12:31:13 2018 (r464904)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1521374534
+SHA256 (markdrago-pgsanity-v0.2.8-16-gd82a5be_GH0.tar.gz) = 6f08f723f08d2eee201fff8f0fdb855d7c7bb0b7e9063cff428c03b4b37f7eee
+SIZE (markdrago-pgsanity-v0.2.8-16-gd82a5be_GH0.tar.gz) = 7673
Added: head/databases/pgsanity/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/pgsanity/pkg-descr Sun Mar 18 12:31:13 2018 (r464904)
@@ -0,0 +1,14 @@
+PgSanity checks the syntax of PostgreSQL SQL files.
+
+It does this by leveraging the ecpg command which is traditionally
+used for preparing C files with embedded SQL for compilation.
+However, as part of that preparation, ecpg checks the embedded SQL
+statements for syntax errors using the exact same parser that is in
+PostgreSQL.
+
+So the approach that PgSanity takes is to take a file that has a list
+of bare SQL in it, make that file look like a C file with embedded
+SQL, run it through ecpg and let ecpg report on the syntax errors of
+the SQL.
+
+WWW: https://github.com/markdrago/pgsanity
More information about the svn-ports-head
mailing list