[Git][debian-gis-team/pgsql-ogr-fdw][upstream] New upstream version 1.1.9

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri Jul 10 05:13:16 BST 2026



Bas Couwenberg pushed to branch upstream at Debian GIS Project / pgsql-ogr-fdw


Commits:
0c355e98 by Bas Couwenberg at 2026-07-10T06:03:20+02:00
New upstream version 1.1.9
- - - - -


9 changed files:

- .github/workflows/ci.yml
- Makefile
- ogr_fdw.c
- ogr_fdw.h
- ogr_fdw_common.h
- ogr_fdw_func.c
- ogr_fdw_gdal.h
- ogr_fdw_info.c
- stringbuffer.h


Changes:

=====================================
.github/workflows/ci.yml
=====================================
@@ -1,72 +1,42 @@
-# GitHub Actions for OGR-FDW
+# GitHub Actions for pgSQL OGR-FDW
 #
 # Paul Ramsey <pramsey at cleverelephant dot ca>
 
 name: "CI"
-on:
-  push:
-#    branches-ignore:
-#      - 'master'
-  pull_request: ~
+on: [push, pull_request]
 
 jobs:
   linux:
-    name: "CI"
+    name: PG ${{ matrix.pg }}
+    runs-on: ubuntu-latest
+    container:
+      image: pgxn/pgxn-tools
     strategy:
-        fail-fast: false
-        matrix:
-          ci:
-          - { PGVER: 15 }
-          - { PGVER: 16 }
-          - { PGVER: 17 }
-          - { PGVER: 18 }
-          - { PGVER: 19 }
+      fail-fast: false
+      matrix:
+        pg: [15, 16, 17, 18, 19]
 
-    runs-on: ubuntu-latest
     steps:
 
     - name: 'Check Out'
-      uses: actions/checkout at v5
+      uses: actions/checkout at v6
 
-    - name: 'Raise Priority for apt.postgresql.org'
-      run: |
-        cat << EOF >> ./pgdg.pref
-        Package: *
-        Pin: release o=apt.postgresql.org
-        Pin-Priority: 600
-        EOF
-        sudo mv ./pgdg.pref /etc/apt/preferences.d/
-        sudo apt update
+    - name: 'Start PostgreSQL ${{ matrix.pg }}'
+      run: pg-start ${{ matrix.pg }}
 
     - name: 'Install GDAL'
       run: |
-        sudo apt-get install libgdal-dev
+        apt-get update
+        apt-get -y install libgdal-dev
 
-    - name: 'Install PostgreSQL'
-      run: |
-        sudo apt-get purge postgresql-*
-        sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main ${{ matrix.ci.PGVER }}" > /etc/apt/sources.list.d/pgdg.list'
-        curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
-        sudo apt-get update
-        sudo apt-get -y install postgresql-${{ matrix.ci.PGVER }} postgresql-server-dev-${{ matrix.ci.PGVER }}
 
-    - name: 'Start PostgreSQL'
+    - name: 'Build & Install'
       run: |
-        export PGVER=${{ matrix.ci.PGVER }}
-        export PGDATA=/var/lib/postgresql/$PGVER/main
-        export PGETC=/etc/postgresql/$PGVER/main
-        export PGBIN=/usr/lib/postgresql/$PGVER/bin
-        export RUNNER_USER=`whoami`
-        # make sure postgres user can access data files
-        sudo chmod -R 755 /home/${RUNNER_USER}
-        sudo cp ./ci/pg_hba.conf $PGETC/pg_hba.conf
-        sudo systemctl stop postgresql
-        sudo pg_ctlcluster $PGVER main start
-        sudo pg_lsclusters
+        export PG_CFLAGS=-Werror
+        make && make install
+
+    - name: 'Test'
+      run: PGUSER=postgres make installcheck || (cat regression.diffs && false)
+
+
 
-    - name: 'Build & Test'
-      run: |
-        export PATH=/usr/lib/postgresql/${{ matrix.ci.PGVER }}/bin/:$PATH
-        PG_CFLAGS=-Werror make
-        sudo make install
-        PGUSER=postgres make installcheck || (cat regression.diffs && /bin/false)


=====================================
Makefile
=====================================
@@ -14,6 +14,9 @@ DATA = \
 	ogr_fdw--1.0--1.1.sql \
 	ogr_fdw--1.1.sql
 
+EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
+               cut -f2 -d= | tr -d "'" | tr -d " ")
+
 REGRESS = ogr_fdw
 
 EXTRA_CLEAN = sql/*.sql expected/*.out
@@ -28,6 +31,8 @@ GDAL_LIBS  = $(shell $(GDAL_CONFIG) --libs)
 PG_CONFIG = pg_config
 REGRESS_OPTS = --encoding=UTF8
 
+PG_CFLAGS += -D OGR_FDW_VERSION=\"$(EXTVERSION)\"
+
 PG_CPPFLAGS += $(GDAL_CFLAGS)
 LIBS += $(GDAL_LIBS)
 SHLIB_LINK := $(LIBS)


=====================================
ogr_fdw.c
=====================================
@@ -40,7 +40,18 @@
 #include "ogr_fdw.h"
 
 
+/*
+ * Set up as a PgSQL module
+ */
+#ifdef PG_MODULE_MAGIC_EXT
+PG_MODULE_MAGIC_EXT(
+    .name = "ogr_fdw",
+    .version = OGR_FDW_VERSION
+);
+#else
 PG_MODULE_MAGIC;
+#endif
+
 
 /*
  * Describes the valid options for objects that use this wrapper.


=====================================
ogr_fdw.h
=====================================
@@ -8,10 +8,7 @@
  *-------------------------------------------------------------------------
  */
 
-#ifndef _OGR_FDW_H
-#define _OGR_FDW_H 1
-
-#define OGR_FDW_RELEASE_NAME "1.1"
+#pragma once
 
 /*
  * PostgreSQL
@@ -79,6 +76,7 @@
 #include "ogr_fdw_common.h"
 
 /* Local configuration defines */
+#define OGR_FDW_VERSION "1.1"
 
 /* Use hexwkb input by default, but have option to use */
 /* the binary recv input instead. Binary input is strict */
@@ -216,4 +214,3 @@ bool ogrDeparse(StringInfo buf, PlannerInfo* root, RelOptInfo* foreignrel, List*
 Oid ogrGetGeometryOid(void);
 OGRErr pgDatumToOgrGeometry (Datum pg_geometry, Oid pgsendfunc, OGRGeometryH* ogr_geometry);
 
-#endif /* _OGR_FDW_H */


=====================================
ogr_fdw_common.h
=====================================
@@ -8,8 +8,7 @@
  *-------------------------------------------------------------------------
  */
 
-#ifndef _OGR_FDW_COMMON_H
-#define _OGR_FDW_COMMON_H 1
+#pragma once
 
 #include <string.h>
 #include <ctype.h>
@@ -26,8 +25,7 @@
 void ogrStringLaunder(char *str);
 
 OGRErr ogrLayerToSQL (const OGRLayerH ogr_lyr, const char *fwd_server,
-                      int launder_table_names, int launder_column_names,
-                      const char *fdw_table_name,
-                      int use_postgis_geometry, stringbuffer_t *buf);
+					  int launder_table_names, int launder_column_names,
+					  const char *fdw_table_name,
+					  int use_postgis_geometry, stringbuffer_t *buf);
 
-#endif /* _OGR_FDW_COMMON_H */


=====================================
ogr_fdw_func.c
=====================================
@@ -79,7 +79,7 @@ PG_FUNCTION_INFO_V1(ogr_fdw_version);
 Datum ogr_fdw_version(PG_FUNCTION_ARGS)
 {
 	const char *gdal_ver = GDAL_RELEASE_NAME;
-	const char *ogr_fdw_ver = OGR_FDW_RELEASE_NAME;
+	const char *ogr_fdw_ver = OGR_FDW_VERSION;
 	char ver_str[256];
 	snprintf(ver_str, sizeof(ver_str), "OGR_FDW=\"%s\" GDAL=\"%s\"", ogr_fdw_ver, gdal_ver);
 	PG_RETURN_TEXT_P(cstring_to_text(ver_str));


=====================================
ogr_fdw_gdal.h
=====================================
@@ -1,6 +1,5 @@
 
-#ifndef _OGR_FDW_GDAL_H
-#define _OGR_FDW_GDAL_H 1
+#pragma once
 
 /*
  * Quiet warnings due to double use of
@@ -67,4 +66,3 @@
 
 #endif /* GDAL 1 support */
 
-#endif /* _OGR_FDW_GDAL_H */


=====================================
ogr_fdw_info.c
=====================================
@@ -298,7 +298,7 @@ ogrGenerateSQL(const char* server, const char* layer, const char* table, const c
 	if (! ogr_dr)
 		ogr_dr = GDALGetDatasetDriver(ogr_ds);
 
-	strlcpy(server_name, server == NULL ? "myserver" : server, sizeof(server_name));
+	strncpy(server_name, server == NULL ? "myserver" : server, sizeof(server_name));
 
 	if (options != NULL) {
 		char *p;
@@ -306,7 +306,7 @@ ogrGenerateSQL(const char* server, const char* layer, const char* table, const c
 		char option[NAMEDATALEN];
 		const char *short_name = GDALGetDriverShortName(ogr_dr);
 
-		strlcpy(stripped_config_options, options, STR_MAX_LEN - 1);
+		strncpy(stripped_config_options, options, STR_MAX_LEN - 1);
 		p = strtok(strip_spaces(stripped_config_options), ",");
 
 		while (p != NULL) {


=====================================
stringbuffer.h
=====================================
@@ -9,8 +9,7 @@
  *-------------------------------------------------------------------------
  */
 
-#ifndef _STRINGBUFFER_H
-#define _STRINGBUFFER_H 1
+#pragma once
 
 #include <stdlib.h>
 #include <stdarg.h>
@@ -45,4 +44,3 @@ extern char stringbuffer_lastchar(stringbuffer_t *s);
 extern int stringbuffer_trim_trailing_white(stringbuffer_t *s);
 extern int stringbuffer_trim_trailing_zeroes(stringbuffer_t *s);
 
-#endif /* _STRINGBUFFER_H */



View it on GitLab: https://salsa.debian.org/debian-gis-team/pgsql-ogr-fdw/-/commit/0c355e9846663092cf8fbef5abc7080e0003ccac

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pgsql-ogr-fdw/-/commit/0c355e9846663092cf8fbef5abc7080e0003ccac
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260710/4377ff42/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list