[Git][debian-gis-team/pgsql-ogr-fdw][master] 5 commits: New upstream version 1.0.7
Bas Couwenberg
gitlab at salsa.debian.org
Tue Sep 25 06:33:18 BST 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / pgsql-ogr-fdw
Commits:
09cbc603 by Bas Couwenberg at 2018-09-25T05:09:30Z
New upstream version 1.0.7
- - - - -
e580b1ff by Bas Couwenberg at 2018-09-25T05:09:31Z
Merge tag 'upstream/1.0.7'
Upstream version 1.0.7
- - - - -
c431e77e by Bas Couwenberg at 2018-09-25T05:09:55Z
New upstream release.
- - - - -
bfa58351 by Bas Couwenberg at 2018-09-25T05:24:06Z
Drop unused lintian overrides.
- - - - -
eb405246 by Bas Couwenberg at 2018-09-25T05:24:06Z
Set distribution to unstable.
- - - - -
5 changed files:
- debian/changelog
- − debian/source/lintian-overrides
- ogr_fdw.c
- ogr_fdw.h
- ogr_fdw_deparse.c
Changes:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,12 @@
-pgsql-ogr-fdw (1.0.6-3) UNRELEASED; urgency=medium
+pgsql-ogr-fdw (1.0.7-1) unstable; urgency=medium
+ * Team upload.
+ * New upstream release.
* Bump Standards-Version to 4.2.1, no changes.
* Update watch file to handle common issues.
+ * Drop unused lintian overrides.
- -- Christoph Berg <christoph.berg at credativ.de> Sun, 05 Aug 2018 20:42:37 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 25 Sep 2018 07:10:57 +0200
pgsql-ogr-fdw (1.0.6-2) unstable; urgency=medium
=====================================
debian/source/lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# don't bug people uploading from @work
-source: changelog-should-mention-nmu
-source: source-nmu-has-incorrect-version-number
=====================================
ogr_fdw.c
=====================================
@@ -192,15 +192,6 @@ ogrErrorHandler(CPLErr eErrClass, int err_no, const char *msg)
void
_PG_init(void)
{
- Oid typoid = TypenameGetTypid("geometry");
- if (OidIsValid(typoid) && get_typisdefined(typoid))
- {
- GEOMETRYOID = typoid;
- }
- else
- {
- GEOMETRYOID = BYTEAOID;
- }
on_proc_exit(&ogr_fdw_exit, PointerGetDatum(NULL));
@@ -220,6 +211,25 @@ ogr_fdw_exit(int code, Datum arg)
OGRCleanupAll();
}
+/*
+ * Function to get the geometry OID if required
+ */
+Oid ogrGetGeometryOid(void)
+{
+ if (GEOMETRYOID == InvalidOid) {
+ Oid typoid = TypenameGetTypid("geometry");
+ if (OidIsValid(typoid) && get_typisdefined(typoid))
+ {
+ GEOMETRYOID = typoid;
+ }
+ else
+ {
+ GEOMETRYOID = BYTEAOID;
+ }
+ }
+
+ return GEOMETRYOID;
+}
/*
* Foreign-data wrapper handler function: return a struct with pointers
@@ -1175,7 +1185,7 @@ ogrReadColumnData(OgrFdwState *state)
/* If the OGR source has geometries, can we match them to Pg columns? */
/* We'll match to the first ones we find, irrespective of name */
- if ( geom_count < ogr_geom_count && col.pgtype == GEOMETRYOID )
+ if ( geom_count < ogr_geom_count && col.pgtype == ogrGetGeometryOid() )
{
col.ogrvariant = OGR_GEOMETRY;
col.ogrfldtype = OFTBinary;
@@ -1256,7 +1266,7 @@ ogrLookupGeometryFunctionOid(const char *proname)
FuncCandidateList clist;
/* This only works if PostGIS is installed */
- if ( GEOMETRYOID == InvalidOid || GEOMETRYOID == BYTEAOID )
+ if ( ogrGetGeometryOid() == InvalidOid || ogrGetGeometryOid() == BYTEAOID )
return InvalidOid;
names = stringToQualifiedNameList(proname);
@@ -1272,7 +1282,7 @@ ogrLookupGeometryFunctionOid(const char *proname)
int i;
for ( i = 0; i < clist->nargs; i++ )
{
- if ( clist->args[i] == GEOMETRYOID )
+ if ( clist->args[i] == ogrGetGeometryOid() )
return clist->oid;
}
}
@@ -1485,7 +1495,7 @@ ogrFeatureToSlot(const OGRFeatureH feat, TupleTableSlot *slot, const OgrFdwExecS
nulls[i] = false;
values[i] = PointerGetDatum(varlena);
}
- else if ( pgtype == GEOMETRYOID )
+ else if ( pgtype == ogrGetGeometryOid() )
{
/*
* For geometry we need to convert the varlena WKB data into a serialized
@@ -2619,7 +2629,7 @@ ogrImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
quote_identifier(server->servername),
launder_table_names,
launder_column_names,
- GEOMETRYOID != BYTEAOID,
+ ogrGetGeometryOid() != BYTEAOID,
&buf
);
=====================================
ogr_fdw.h
=====================================
@@ -183,8 +183,6 @@ typedef struct OgrFdwModifyState
/* Shared function signatures */
bool ogrDeparse(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, List *exprs, OgrFdwState *state, List **param);
-
-/* Shared global value of the Geometry OId */
-extern Oid GEOMETRYOID;
+Oid ogrGetGeometryOid(void);
#endif /* _OGR_FDW_H */
=====================================
ogr_fdw_deparse.c
=====================================
@@ -68,7 +68,7 @@ ogrStringFromDatum(Datum datum, Oid type)
initStringInfo(&result);
/* Special handling to convert a geometry to a bbox needed here */
- if ( type == GEOMETRYOID )
+ if ( type == ogrGetGeometryOid() )
{
elog(ERROR, "got a GEOMETRY!");
return NULL;
@@ -128,7 +128,7 @@ ogrDeparseConst(Const* constant, OgrDeparseCtx *context)
appendStringInfoString(context->buf, "NULL");
}
/* Use geometry as a spatial filter? */
- else if ( constant->consttype == GEOMETRYOID )
+ else if ( constant->consttype == ogrGetGeometryOid() )
{
/*
* For geometry we need to convert the gserialized constant into
@@ -355,7 +355,7 @@ ogrDeparseOpExpr(OpExpr* node, OgrDeparseCtx *context)
// else
// return false;
- // if ( constant->consttype != GEOMETRYOID )
+ // if ( constant->consttype != ogrGetGeometryOid() )
ReleaseSysCache(tuple);
@@ -483,12 +483,12 @@ ogrDeparseNullTest(NullTest *node, OgrDeparseCtx *context)
{
StringInfo buf = context->buf;
- appendStringInfoChar(buf, '(');
- ogrDeparseExpr(node->arg, context);
- if (node->nulltesttype == IS_NULL)
- appendStringInfoString(buf, " IS NULL)");
- else
- appendStringInfoString(buf, " IS NOT NULL)");
+ appendStringInfoChar(buf, '(');
+ ogrDeparseExpr(node->arg, context);
+ if (node->nulltesttype == IS_NULL)
+ appendStringInfoString(buf, " IS NULL)");
+ else
+ appendStringInfoString(buf, " IS NOT NULL)");
return true;
}
View it on GitLab: https://salsa.debian.org/debian-gis-team/pgsql-ogr-fdw/compare/c91779192d9cff6abf1248762c10516014d7303f...eb40524621efc817673b32e9d916e99641e30075
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pgsql-ogr-fdw/compare/c91779192d9cff6abf1248762c10516014d7303f...eb40524621efc817673b32e9d916e99641e30075
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180925/03ed8fef/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list