Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pgsql-ogr-fdw for openSUSE:Factory 
checked in at 2023-08-10 15:33:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pgsql-ogr-fdw (Old)
 and      /work/SRC/openSUSE:Factory/.pgsql-ogr-fdw.new.11712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pgsql-ogr-fdw"

Thu Aug 10 15:33:30 2023 rev:6 rq:1103268 version:1.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/pgsql-ogr-fdw/pgsql-ogr-fdw.changes      
2023-04-21 14:17:37.786788664 +0200
+++ /work/SRC/openSUSE:Factory/.pgsql-ogr-fdw.new.11712/pgsql-ogr-fdw.changes   
2023-08-10 15:33:50.936144490 +0200
@@ -1,0 +2,15 @@
+Tue Aug  8 13:44:22 UTC 2023 - Dirk Stoecker <[email protected]>
+
+- update to 1.1.4, refresh spec file to newer build approach
+
+- Update to version 1.1.4
+  + Support for PostgreSQL 16
+  1.1.3:
+  + Support PgSQL 15 regression testing changes.
+  1.1.2:
+  + Fixes for PgSQL 14 support of UPDATE/DELETE modes
+  + More logging information available when debugging levels enabled
+  1.1.1:
+  + Support PostgreSQL 14
+
+-------------------------------------------------------------------
@@ -60 +74,0 @@
-

Old:
----
  pgsql-ogr-fdw-1.1.0.tar.gz

New:
----
  pgsql-ogr-fdw-1.1.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pgsql-ogr-fdw.spec ++++++
--- /var/tmp/diff_new_pack.Qpo4Vf/_old  2023-08-10 15:33:51.580148507 +0200
+++ /var/tmp/diff_new_pack.Qpo4Vf/_new  2023-08-10 15:33:51.584148531 +0200
@@ -16,58 +16,28 @@
 #
 
 
-%define         pg_flavor @BUILD_FLAVOR@
-%define         sname pgsql-ogr-fdw
-%define         pg_bindir %(pg_config --bindir)
-%define         pg_libdir %(pg_config --pkglibdir)
-%define         pg_share %(pg_config --sharedir)
-%if 0%{?is_opensuse} && ("%{pg_flavor}" == "postgresql11" || "%{pg_flavor}" == 
"postgresql12" || "%{pg_flavor}" == "postgresql13")
-%bcond_without  llvm
-%else
-%bcond_with     llvm
-%endif
-Version:        1.1.0
+%define         pg_name  @BUILD_FLAVOR@%{nil}
+%define         ext_name pgsql-ogr-fdw
+%{pg_version_from_name}
+
+Name:           %{pg_name}-%{ext_name}
+Version:        1.1.4
 Release:        0
 Summary:        PostgreSQL OGR Foreign Data Wrapper
 License:        MIT
 Group:          Productivity/Databases/Tools
 URL:            https://github.com/pramsey/pgsql-ogr-fdw
-Source0:        
https://codeload.github.com/pramsey/pgsql-ogr-fdw/tar.gz/v%{version}#/%{sname}-%{version}.tar.gz
-BuildRequires:  %{pg_flavor}-devel
+Source0:        
https://codeload.github.com/pramsey/pgsql-ogr-fdw/tar.gz/v%{version}#/%{ext_name}-%{version}.tar.gz
+BuildRequires:  %{pg_name}-llvmjit-devel
+BuildRequires:  %{pg_name}-server-devel
+BuildRequires:  clang-devel
 BuildRequires:  gcc-c++
 BuildRequires:  gdal-devel
-BuildRequires:  pkgconfig
-%requires_eq    %{pg_flavor}-server
-BuildRequires:  %{pg_flavor}-server
-%if "%{pg_flavor}" == "postgresql11" || "%{pg_flavor}" == "postgresql12" || 
"%{pg_flavor}" == "postgresql13"
-BuildRequires:  %{pg_flavor}-server-devel
-%if %{with llvm}
-BuildRequires:  %{pg_flavor}-llvmjit
-BuildRequires:  clang-devel
 BuildRequires:  llvm-devel
-%endif
-%endif
-%if "%{pg_flavor}" == "" || "%{pg_flavor}" == "postgresql"
-Name:           %{sname}
-ExclusiveArch:  do_not_build
-%else
-Name:           %{pg_flavor}-%{sname}
-%endif
-# Build for pg11&12 but not for Leap 15.1 (due to lack of maintenance)
-%if (0%{?is_opensuse} && 0%{?sle_version} == 150100) && ("%{pg_flavor}" == 
"postgresql11" || "%{pg_flavor}" == "postgresql12")
-ExclusiveArch:  do_not_build
-%endif
-%if 0%{?suse_version} < 1315 && "%{pg_flavor}" == "postgresql10"
-ExclusiveArch:  do_not_build
-%endif
-%if 0%{?suse_version} >= 1500 && "%{pg_flavor}" == "postgresql95"
-ExclusiveArch:  do_not_build
-%endif
-%if 0%{?suse_version} >= 1550 && "%{pg_flavor}" == "postgresql96"
-ExclusiveArch:  do_not_build
-%endif
-%if "%{pg_flavor}" == ""
-Name:           %{sname}
+BuildRequires:  pkgconfig
+%pg_server_requires
+%if "%{pg_name}" == ""
+Name:           %{ext_name}
 ExclusiveArch:  do_not_build
 %endif
 
@@ -76,58 +46,38 @@
 It allows access to a large number of GIS data formats using a simple C API 
for data reading and writing.
 Since OGR exposes a simple table structure and PostgreSQL foreign data 
wrappers allow access to table structures, the fit seems pretty perfect.
 
-%if %{with llvm}
-%package llvmjit
-Summary:        Just-in-time compilation support for PostgreSQL %{sname} 
extension
-Group:          Productivity/Databases/Tools
-Requires:       %{pg_flavor}-%{sname} = %{version}-%{release}
-Requires:       %{pg_flavor}-llvmjit
-Requires:       %{pg_flavor}-server
-Supplements:    (%{pg_flavor}-llvmjit and %{name})
-
-%description llvmjit
-This package contains support for just-in-time compiling parts of
-PostgreSQL queries. Using LLVM it compiles e.g. expressions and tuple
-deforming into native code, with the goal of accelerating analytics
-queries.
-%endif
-
 %prep
-%setup -q -n %{sname}-%{version}
+%setup -q -n %{ext_name}-%{version}
 
 %build
 export LDFLAGS="-Wl,-z,relro,-z,now -pie"
 export CFLAGS="%{optflags} -fPIE -pie"
 export CXXFLAGS="%{optflags} -fPIE -pie"
-export PATH="$PATH:%{pg_bindir}"
+export PATH="$PATH:%{pg_config_bindir}"
 make V=1 USE_PGXS=1 %{?_smp_mflags}
 
 %install
-export PATH="$PATH:%{pg_bindir}"
+export PATH="$PATH:%{pg_config_bindir}"
 # Needed upstream think it is present
-mkdir -p %{buildroot}/%{pg_bindir}
+mkdir -p %{buildroot}/%{pg_config_bindir}
 make V=1 USE_PGXS=1 install DESTDIR=%{buildroot}
 
 %post
-%{_datadir}/postgresql/install-alternatives %pg_flavor
+%{_datadir}/postgresql/install-alternatives %pg_version
 
 %postun
-%{_datadir}/postgresql/install-alternatives %pg_flavor
+%{_datadir}/postgresql/install-alternatives %pg_version
 
 %files
 %defattr(-, root, root)
 %license LICENSE.md
 %doc README.md FAQ.md
-%{pg_bindir}/ogr_fdw_info
-%{pg_libdir}/ogr_fdw.so
-%dir %{pg_share}/extension/
-%{pg_share}/extension/ogr_fdw--1.0--1.1.sql
-%{pg_share}/extension/ogr_fdw--1.1.sql
-%{pg_share}/extension/ogr_fdw.control
-
-%if %{with llvm}
-%files llvmjit
-%{pg_libdir}/bitcode/*
-%endif
+%{pg_config_bindir}/ogr_fdw_info
+%{pg_config_pkglibdir}/ogr_fdw.so
+%{pg_config_pkglibdir}/bitcode/*
+%dir %{pg_config_sharedir}/extension/
+%{pg_config_sharedir}/extension/ogr_fdw--1.0--1.1.sql
+%{pg_config_sharedir}/extension/ogr_fdw--1.1.sql
+%{pg_config_sharedir}/extension/ogr_fdw.control
 
 %changelog

++++++ _multibuild ++++++
--- /var/tmp/diff_new_pack.Qpo4Vf/_old  2023-08-10 15:33:51.620148756 +0200
+++ /var/tmp/diff_new_pack.Qpo4Vf/_new  2023-08-10 15:33:51.624148781 +0200
@@ -1,5 +1,8 @@
 <multibuild>
   <package>postgresql11</package>
   <package>postgresql12</package>
+  <package>postgresql13</package>
+  <package>postgresql14</package>
+  <package>postgresql15</package>
 </multibuild>
 

++++++ pgsql-ogr-fdw-1.1.0.tar.gz -> pgsql-ogr-fdw-1.1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/.github/workflows/ci.yml 
new/pgsql-ogr-fdw-1.1.4/.github/workflows/ci.yml
--- old/pgsql-ogr-fdw-1.1.0/.github/workflows/ci.yml    1970-01-01 
01:00:00.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/.github/workflows/ci.yml    2023-05-23 
03:06:56.000000000 +0200
@@ -0,0 +1,71 @@
+# GitHub Actions for OGR-FDW
+#
+# Paul Ramsey <pramsey at cleverelephant dot ca>
+
+name: "CI"
+on:
+  push:
+#    branches-ignore:
+#      - 'master'
+  pull_request: ~
+
+jobs:
+  linux:
+    name: "CI"
+    strategy:
+        fail-fast: false
+        matrix:
+          ci:
+          - { PGVER: 13 }
+          - { PGVER: 14 }
+          - { PGVER: 15 }
+          - { PGVER: 16 }
+
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: 'Check Out'
+      uses: actions/checkout@v3
+
+    - 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: 'Install GDAL'
+      run: |
+        sudo apt-get 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-snapshot 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'
+      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
+
+    - 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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/.travis.yml 
new/pgsql-ogr-fdw-1.1.4/.travis.yml
--- old/pgsql-ogr-fdw-1.1.0/.travis.yml 2021-02-01 18:55:33.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-dist: xenial
-sudo: required
-language: cpp
-compiler: gcc
-
-addons:
-  apt:
-    packages:
-    - curl
-    - libcurl4-gnutls-dev
-    - ca-certificates
-    - software-properties-common
-    - python-software-properties
-    - gnupg-curl
-
-env:
-  - PG_VERSION=9.6 GDAL_VERSION=1.11
-  - PG_VERSION=9.6 GDAL_VERSION=2.2.4
-  - PG_VERSION=10 GDAL_VERSION=2.3.3
-  - PG_VERSION=11 GDAL_VERSION=2.4.4
-  - PG_VERSION=12 GDAL_VERSION=2.4.4
-
-before_script:
-  - sudo /etc/init.d/postgresql stop
-  - sudo apt-get -y --purge remove postgresql-9.1
-  - sudo apt-get -y --purge remove postgresql-9.2
-  - sudo apt-get -y --purge remove postgresql-9.3
-  - sudo apt-get -y --purge remove postgresql-9.4
-  - sudo apt-get -y --purge remove postgresql-9.5
-  - sudo apt-get -y --purge remove postgresql-9.6
-  - sudo apt-get -y --purge remove postgresql-10
-  - sudo apt-get -y --purge remove postgresql-11
-  - sudo apt-get -y --purge remove postgresql-common
-  - sudo apt-get -y autoremove
-  - sudo rm -rf /var/lib/postgresql
-  - apt-key adv --fetch-keys https://www.postgresql.org/media/keys/ACCC4CF8.asc
-  - sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ 
xenial-pgdg main $PG_VERSION"
-  - sudo apt-get update -qq
-  - sudo apt-get -y install postgresql-$PG_VERSION 
postgresql-server-dev-$PG_VERSION
-  - sudo cp ci/pg_hba.conf /etc/postgresql/$PG_VERSION/main/pg_hba.conf
-  - sudo /etc/init.d/postgresql reload
-
-  - if [[ $GDAL_VERSION == 1* ]]; then sudo apt-get install libgdal1i 
libgdal-dev; fi
-  - if [[ $GDAL_VERSION == 2* ]]; then bash ci/gdal_build.sh $GDAL_VERSION; fi
-  - if [[ $GDAL_VERSION == 3* ]]; then bash ci/gdal_build.sh $GDAL_VERSION; fi
-  # needs proj6
-
-
-script:
-  - make && sudo make install && sudo chmod 755 $HOME && (PGUSER=postgres make 
installcheck || (cat regression.diffs && /bin/false))
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/Makefile 
new/pgsql-ogr-fdw-1.1.4/Makefile
--- old/pgsql-ogr-fdw-1.1.0/Makefile    2021-02-01 18:55:33.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/Makefile    2023-05-23 03:06:56.000000000 +0200
@@ -41,6 +41,26 @@
 REGRESS += import
 endif
 
+# work around pg15 change to regression file variable
+# substitution for @abs_srcdir@ until we can drop older
+# version support
+# 
https://github.com/postgres/postgres/commit/d1029bb5a26cb84b116b0dee4dde312291359f2a
+PG15 := $(shell [ $(PG_VERSION_NUM) -ge 150000 ] && echo yes)
+ifeq ($(PG15),yes)
+
+sql/%.sql: input/%.source
+       perl -pe 's#\@abs_srcdir\@#$(PWD)#g' < $< > $@
+
+expected/%.out: output/%.source
+       perl -pe 's#\@abs_srcdir\@#$(PWD)#g' < $< > $@
+
+SQLFILES := sql/file.sql sql/import.sql sql/pgsql.sql sql/postgis.sql
+OUTFILES := expected/file.out expected/import.out expected/pgsql.out 
expected/postgis.out
+
+installcheck: $(SQLFILES) $(OUTFILES)
+
+endif
+
 ###############################################################
 # Build the utility program after PGXS to override the
 # PGXS environment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/README.md 
new/pgsql-ogr-fdw-1.1.4/README.md
--- old/pgsql-ogr-fdw-1.1.0/README.md   2021-02-01 18:55:33.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/README.md   2023-05-23 03:06:56.000000000 +0200
@@ -1,4 +1,4 @@
-Travis: [![Build 
Status](https://secure.travis-ci.org/pramsey/pgsql-ogr-fdw.png)](http://travis-ci.org/pramsey/pgsql-ogr-fdw)
+[![Build 
Status](https://github.com/pramsey/pgsql-ogr-fdw/actions/workflows/ci.yml/badge.svg)](https://github.com/pramsey/pgsql-ogr-fdw/actions/workflows/ci.yml)
 
 # PostgreSQL OGR Foreign Data Wrapper
 
@@ -18,11 +18,11 @@
 
 ## Download
 * Windows
-  * Via [Stackbuilder](https://www.postgresql.org/download/windows/) (part of 
PostGIS Bundle)
+       * Via [Stackbuilder](https://www.postgresql.org/download/windows/) 
(part of PostGIS Bundle)
 * Linux
   * [Arch Linux](https://aur.archlinux.org/packages/pgsql-ogr-fdw/)
-  * [Ubuntu](https://launchpad.net/ubuntu/+source/pgsql-ogr-fdw)
-  * [Red Hat](https://yum.postgresql.org/news-packagelist.php)
+  * [Ubuntu](https://launchpad.net/ubuntu/+source/pgsql-ogr-fdw), [PGDG Apt: 
Debian / Ubuntu](https://apt.postgresql.org)
+  * [PGDG Yum: Redhat EL, CentOS, Rocky](https://yum.postgresql.org/)
 * OSX
 
 ## Basic Operation
@@ -46,39 +46,39 @@
 # ogr_fdw_info -f
 
 Supported Formats:
-  -> "PCIDSK" (read/write)
-  -> "netCDF" (read/write)
-  ...
-  -> "HTTP" (readonly)
+       -> "PCIDSK" (read/write)
+       -> "netCDF" (read/write)
+       ...
+       -> "HTTP" (readonly)
 
 # ogr_fdw_info -s /tmp/test
 
 Layers:
-  pt_two
+       pt_two
 
 # ogr_fdw_info -s /tmp/test -l pt_two
 
 CREATE SERVER "myserver"
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource '/tmp/test',
-    format 'ESRI Shapefile' );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource '/tmp/test',
+               format 'ESRI Shapefile' );
 
 CREATE FOREIGN TABLE "pt_two" (
-  fid integer,
-  "geom" geometry(Point, 4326),
-  "name" varchar,
-  "age" integer,
-  "height" real,
-  "birthdate" date )
-  SERVER "myserver"
-  OPTIONS (layer 'pt_two');
+       fid integer,
+       "geom" geometry(Point, 4326),
+       "name" varchar,
+       "age" integer,
+       "height" real,
+       "birthdate" date )
+       SERVER "myserver"
+       OPTIONS (layer 'pt_two');
 ```
 
 Copy the `CREATE SERVER` and `CREATE FOREIGN SERVER` SQL commands into the 
database and you'll have your foreign table definition.
 ```
-             Foreign table "public.pt_two"
-  Column  |       Type        | Modifiers | FDW Options
+                                                Foreign table "public.pt_two"
+       Column  |       Type        | Modifiers | FDW Options
 ----------+-------------------+-----------+-------------
  fid      | integer           |           |
  geom     | geometry          |           |
@@ -98,8 +98,8 @@
 ```
  fid |                    geom                    | name  | age | height |  
birthday
 
-----+--------------------------------------------+-------+-----+--------+------------
-   0 | 0101000000C00497D1162CB93F8CBAEF08A080E63F | Peter |  45 |    5.6 | 
1965-04-12
-   1 | 010100000054E943ACD697E2BFC0895EE54A46CF3F | Paul  |  33 |   5.84 | 
1971-03-25
+        0 | 0101000000C00497D1162CB93F8CBAEF08A080E63F | Peter |  45 |    5.6 
| 1965-04-12
+        1 | 010100000054E943ACD697E2BFC0895EE54A46CF3F | Paul  |  33 |   5.84 
| 1971-03-25
 ```
 
 You can also apply filters, and see the portions that will be pushed down to 
the OGR driver, by setting the debug level to `DEBUG1`.
@@ -132,40 +132,40 @@
 CREATE EXTENSION ogr_fdw;
 
 CREATE SERVER geoserver
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource 'WFS:https://demo.geo-solutions.it/geoserver/wfs',
-    format 'WFS' );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource 'WFS:https://demo.geo-solutions.it/geoserver/wfs',
+               format 'WFS' );
 
 CREATE FOREIGN TABLE topp_states (
-  fid bigint,
-  the_geom Geometry(MultiSurface,4326),
-  gml_id varchar,
-  state_name varchar,
-  state_fips varchar,
-  sub_region varchar,
-  state_abbr varchar,
-  land_km double precision,
-  water_km double precision,
-  persons double precision,
-  families double precision,
-  houshold double precision,
-  male double precision,
-  female double precision,
-  workers double precision,
-  drvalone double precision,
-  carpool double precision,
-  pubtrans double precision,
-  employed double precision,
-  unemploy double precision,
-  service double precision,
-  manual double precision,
-  p_male double precision,
-  p_female double precision,
-  samp_pop double precision
-  )
-  SERVER "geoserver"
-  OPTIONS (layer 'topp:states');
+       fid bigint,
+       the_geom Geometry(MultiSurface,4326),
+       gml_id varchar,
+       state_name varchar,
+       state_fips varchar,
+       sub_region varchar,
+       state_abbr varchar,
+       land_km double precision,
+       water_km double precision,
+       persons double precision,
+       families double precision,
+       houshold double precision,
+       male double precision,
+       female double precision,
+       workers double precision,
+       drvalone double precision,
+       carpool double precision,
+       pubtrans double precision,
+       employed double precision,
+       unemploy double precision,
+       service double precision,
+       manual double precision,
+       p_male double precision,
+       p_female double precision,
+       samp_pop double precision
+       )
+       SERVER "geoserver"
+       OPTIONS (layer 'topp:states');
 ```
 
 ### FGDB FDW
@@ -173,27 +173,27 @@
 Unzip the `Querying.zip` file from the `data` directory to get a 
`Querying.gdb` file, and put it somewhere public (like `/tmp`). Now run the 
`ogr_fdw_info` tool on it to get a table definition.
 ```sql
 CREATE SERVER fgdbtest
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource '/tmp/Querying.gdb',
-    format 'OpenFileGDB' );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource '/tmp/Querying.gdb',
+               format 'OpenFileGDB' );
 
 CREATE FOREIGN TABLE cities (
-  fid integer,
-  geom geometry(Point, 4326),
-  city_fips varchar,
-  city_name varchar,
-  state_fips varchar,
-  state_name varchar,
-  state_city varchar,
-  type varchar,
-  capital varchar,
-  elevation integer,
-  pop1990 integer,
-  popcat integer
-  )
-  SERVER fgdbtest
-  OPTIONS (layer 'Cities');
+       fid integer,
+       geom geometry(Point, 4326),
+       city_fips varchar,
+       city_name varchar,
+       state_fips varchar,
+       state_name varchar,
+       state_city varchar,
+       type varchar,
+       capital varchar,
+       elevation integer,
+       pop1990 integer,
+       popcat integer
+       )
+       SERVER fgdbtest
+       OPTIONS (layer 'Cities');
 ```
 Query away!
 
@@ -204,48 +204,48 @@
 
 ```sql
 CREATE TABLE apostles (
-  fid serial primary key,
-  geom geometry(Point, 4326),
-  joined integer,
-  name text,
-  height real,
-  born date,
-  clock time,
-  ts timestamp
+       fid serial primary key,
+       geom geometry(Point, 4326),
+       joined integer,
+       name text,
+       height real,
+       born date,
+       clock time,
+       ts timestamp
 );
 
 INSERT INTO apostles (name, geom, joined, height, born, clock, ts) VALUES
-  ('Peter', 'SRID=4326;POINT(30.31 59.93)', 1, 1.6, '1912-01-10', '10:10:01', 
'1912-01-10 10:10:01'),
-  ('Andrew', 'SRID=4326;POINT(-2.8 56.34)', 2, 1.8, '1911-02-11', '10:10:02', 
'1911-02-11 10:10:02'),
-  ('James', 'SRID=4326;POINT(-79.23 42.1)', 3, 1.72, '1910-03-12', '10:10:03', 
'1910-03-12 10:10:03'),
-  ('John', 'SRID=4326;POINT(13.2 47.35)', 4, 1.45, '1909-04-01', '10:10:04', 
'1909-04-01 10:10:04'),
-  ('Philip', 'SRID=4326;POINT(-75.19 40.69)', 5, 1.65, '1908-05-02', 
'10:10:05', '1908-05-02 10:10:05'),
-  ('Bartholomew', 'SRID=4326;POINT(-62 18)', 6, 1.69, '1907-06-03', 
'10:10:06', '1907-06-03 10:10:06'),
-  ('Thomas', 'SRID=4326;POINT(-80.08 35.88)', 7, 1.68, '1906-07-04', 
'10:10:07', '1906-07-04 10:10:07'),
-  ('Matthew', 'SRID=4326;POINT(-73.67 20.94)', 8, 1.65, '1905-08-05', 
'10:10:08', '1905-08-05 10:10:08'),
-  ('James Alpheus', 'SRID=4326;POINT(-84.29 34.07)', 9, 1.78, '1904-09-06', 
'10:10:09', '1904-09-06 10:10:09'),
-  ('Thaddaeus', 'SRID=4326;POINT(79.13 10.78)', 10, 1.88, '1903-10-07', 
'10:10:10', '1903-10-07 10:10:10'),
-  ('Simon', 'SRID=4326;POINT(-85.97 41.75)', 11, 1.61, '1902-11-08', 
'10:10:11', '1902-11-08 10:10:11'),
-  ('Judas Iscariot', 'SRID=4326;POINT(35.7 32.4)', 12, 1.71, '1901-12-09', 
'10:10:12', '1901-12-09 10:10:12');
+       ('Peter', 'SRID=4326;POINT(30.31 59.93)', 1, 1.6, '1912-01-10', 
'10:10:01', '1912-01-10 10:10:01'),
+       ('Andrew', 'SRID=4326;POINT(-2.8 56.34)', 2, 1.8, '1911-02-11', 
'10:10:02', '1911-02-11 10:10:02'),
+       ('James', 'SRID=4326;POINT(-79.23 42.1)', 3, 1.72, '1910-03-12', 
'10:10:03', '1910-03-12 10:10:03'),
+       ('John', 'SRID=4326;POINT(13.2 47.35)', 4, 1.45, '1909-04-01', 
'10:10:04', '1909-04-01 10:10:04'),
+       ('Philip', 'SRID=4326;POINT(-75.19 40.69)', 5, 1.65, '1908-05-02', 
'10:10:05', '1908-05-02 10:10:05'),
+       ('Bartholomew', 'SRID=4326;POINT(-62 18)', 6, 1.69, '1907-06-03', 
'10:10:06', '1907-06-03 10:10:06'),
+       ('Thomas', 'SRID=4326;POINT(-80.08 35.88)', 7, 1.68, '1906-07-04', 
'10:10:07', '1906-07-04 10:10:07'),
+       ('Matthew', 'SRID=4326;POINT(-73.67 20.94)', 8, 1.65, '1905-08-05', 
'10:10:08', '1905-08-05 10:10:08'),
+       ('James Alpheus', 'SRID=4326;POINT(-84.29 34.07)', 9, 1.78, 
'1904-09-06', '10:10:09', '1904-09-06 10:10:09'),
+       ('Thaddaeus', 'SRID=4326;POINT(79.13 10.78)', 10, 1.88, '1903-10-07', 
'10:10:10', '1903-10-07 10:10:10'),
+       ('Simon', 'SRID=4326;POINT(-85.97 41.75)', 11, 1.61, '1902-11-08', 
'10:10:11', '1902-11-08 10:10:11'),
+       ('Judas Iscariot', 'SRID=4326;POINT(35.7 32.4)', 12, 1.71, 
'1901-12-09', '10:10:12', '1901-12-09 10:10:12');
 
 CREATE SERVER wraparound
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource 'Pg:dbname=fdw user=postgres',
-    format 'PostgreSQL' );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource 'Pg:dbname=fdw user=postgres',
+               format 'PostgreSQL' );
 
 CREATE FOREIGN TABLE apostles_fdw (
-  fid integer,
-  geom geometry(Point, 4326),
-  joined integer,
-  name text,
-  height real,
-  born date,
-  clock time,
-  ts timestamp
+       fid integer,
+       geom geometry(Point, 4326),
+       joined integer,
+       name text,
+       height real,
+       born date,
+       clock time,
+       ts timestamp
 )
 SERVER wraparound
-  OPTIONS (layer 'apostles');
+       OPTIONS (layer 'apostles');
 
 SELECT * FROM apostles_fdw;
 ```
@@ -261,10 +261,10 @@
 By default, servers and tables are updateable if the OGR driver supports it, 
but you can turn off updateability at a server or table level using the 
`updateable` option:
 ```sql
 ALTER SERVER myserver
-  OPTIONS (ADD updateable 'false');
+       OPTIONS (ADD updateable 'false');
 
 ALTER FOREIGN TABLE mytable
-  OPTIONS (ADD updateable 'false');
+       OPTIONS (ADD updateable 'false');
 ```
 Writeable tables only work if you have included a `fid` column in your table 
definition. By default, tables imported by `IMPORT FOREIGN SCHEMA` or using the 
example SQL code from `ogr_fdw_info` include a `fid` column.
 
@@ -273,21 +273,21 @@
 You can create an FDW table with any subset of columns from the OGR source you 
like, just by using the same column names as the source:
 ```sql
 CREATE FOREIGN TABLE typetest_fdw_partial (
-  clock time,
-  name varchar
-  )
-  SERVER wraparound
-  OPTIONS (layer 'typetest');
+       clock time,
+       name varchar
+       )
+       SERVER wraparound
+       OPTIONS (layer 'typetest');
 ```
 You can also explicitly map remote column names to different local names using 
the `column_name` option:
 ```sql
 CREATE FOREIGN TABLE typetest_fdw_mapped (
-  fid bigint,
-  supertime time OPTIONS (column_name 'clock'),
-  thebestnamething varchar OPTIONS (column_name 'name')
-  )
-  SERVER wraparound
-  OPTIONS (layer 'typetest');
+       fid bigint,
+       supertime time OPTIONS (column_name 'clock'),
+       thebestnamething varchar OPTIONS (column_name 'name')
+       )
+       SERVER wraparound
+       OPTIONS (layer 'typetest');
 ```
 
 ### Automatic Foreign Table Creation
@@ -303,8 +303,8 @@
 CREATE SCHEMA fgdball;
 
 IMPORT FOREIGN SCHEMA ogr_all
-  FROM SERVER fgdbtest
-  INTO fgdball;
+       FROM SERVER fgdbtest
+       INTO fgdball;
 ```
 #### Import a Subset of Tables
 
@@ -315,8 +315,8 @@
 CREATE SCHEMA fgdbcityinf;
 
 IMPORT FOREIGN SCHEMA "CitiesIn"
-  FROM SERVER fgdbtest
-  INTO fgdbcityinf;
+       FROM SERVER fgdbtest
+       INTO fgdbcityinf;
 ```
 You can also use PostgreSQL clauses `LIMIT TO` and `EXCEPT` to restrict the 
tables you are importing.
 ```sql
@@ -324,25 +324,25 @@
 
 -- import only layer called Cities
 IMPORT FOREIGN SCHEMA ogr_all
-  LIMIT TO(cities)
-  FROM server fgdbtest
-  INTO fgdbcitysub ;
+       LIMIT TO(cities)
+       FROM server fgdbtest
+       INTO fgdbcitysub ;
 
 -- import only layers not called Cities or Countries
 IMPORT FOREIGN SCHEMA ogr_all
-  EXCEPT (cities, countries)
-  FROM server fgdbtest
-  INTO fgdbcitysub;
+       EXCEPT (cities, countries)
+       FROM server fgdbtest
+       INTO fgdbcitysub;
 
 -- With table laundering turned off, need to use exact layer names
 DROP SCHEMA IF EXISTS fgdbcitysub CASCADE;
 
-  -- import with un-laundered table name
+       -- import with un-laundered table name
 IMPORT FOREIGN SCHEMA ogr_all
-  LIMIT TO("Cities")
-  FROM server fgdbtest
-  INTO fgdbcitysub
-  OPTIONS (launder_table_names 'false') ;
+       LIMIT TO("Cities")
+       FROM server fgdbtest
+       INTO fgdbcitysub
+       OPTIONS (launder_table_names 'false') ;
 ```
 
 #### Mixed Case and Special Characters
@@ -358,15 +358,15 @@
 CREATE SCHEMA fgdbcitypreserve;
 
 IMPORT FOREIGN SCHEMA ogr_all
-  FROM SERVER fgdbtest
-  INTO fgdbpreserve
-  OPTIONS (
-    launder_table_names 'false',
-    launder_column_names 'false'
-  );
+       FROM SERVER fgdbtest
+       INTO fgdbpreserve
+       OPTIONS (
+               launder_table_names 'false',
+               launder_column_names 'false'
+       );
 ```
 
-###  GDAL Options
+### GDAL Options
 
 The behavior of your GDAL/OGR connection can be altered by passing GDAL 
`config_options` to the connection when you set up the server. Most GDAL/OGR 
drivers have some specific behaviours that are controlled by configuration 
options. For example, the "[ESRI 
Shapefile](http://www.gdal.org/drv_shapefile.html)" driver includes a 
`SHAPE_ENCODING` option that controls the character encoding applied to text 
data.
 
@@ -374,12 +374,12 @@
 
 ```sql
 CREATE SERVER myserver_latin1
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource '/tmp/test',
-    format 'ESRI Shapefile',
-    config_options 'SHAPE_ENCODING=LATIN1'
-  );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource '/tmp/test',
+               format 'ESRI Shapefile',
+               config_options 'SHAPE_ENCODING=LATIN1'
+       );
 ```
 
 Multiple config options can be passed at one time by supplying a 
**space-separated** list of options.
@@ -388,12 +388,12 @@
 
 ```sql
 CREATE SERVER myserver_latin1
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource '/tmp/test',
-    format 'ESRI Shapefile',
-    open_options 'ENCODING=LATIN1'
-  );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource '/tmp/test',
+               format 'ESRI Shapefile',
+               open_options 'ENCODING=LATIN1'
+       );
 ```
 
 ### GDAL Debugging
@@ -402,12 +402,12 @@
 
 ```sql
 CREATE SERVER myserver_latin1
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource '/tmp/test',
-    format 'ESRI Shapefile',
-    config_options 'SHAPE_ENCODING=LATIN1 CPL_DEBUG=ON'
-  );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource '/tmp/test',
+               format 'ESRI Shapefile',
+               config_options 'SHAPE_ENCODING=LATIN1 CPL_DEBUG=ON'
+       );
 ```
 
 GDAL-level messages will be logged at the PostgreSQL **DEBUG2** level, so to 
see them when running a query, alter your `client_min_messages` setting.
@@ -421,9 +421,9 @@
 ```sql
 SET client_min_messages = notice;
 ALTER SERVER myserver_latin1
-  OPTIONS (
-       SET config_options 'SHAPE_ENCODING=LATIN1'
-  );
+       OPTIONS (
+               SET config_options 'SHAPE_ENCODING=LATIN1'
+       );
 ```
 
 ### Utility Functions
@@ -447,17 +447,17 @@
 
 ```sql
 CREATE SERVER odbc_latin1
-  FOREIGN DATA WRAPPER ogr_fdw
-  OPTIONS (
-    datasource 'ODBC:username@servicename',
-    format 'ODBC',
-    character_encoding 'WIN1250'
-  );
+       FOREIGN DATA WRAPPER ogr_fdw
+       OPTIONS (
+               datasource 'ODBC:username@servicename',
+               format 'ODBC',
+               character_encoding 'WIN1250'
+       );
 
 CREATE FOREIGN TABLE featuretable_fdw (
-  name text,
-  geom geometry(Point, 4326)
+       name text,
+       geom geometry(Point, 4326)
 )
 SERVER odbc_latin1
-  OPTIONS (layer 'featuretable');
+       OPTIONS (layer 'featuretable');
 ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/ogr_fdw.c 
new/pgsql-ogr-fdw-1.1.4/ogr_fdw.c
--- old/pgsql-ogr-fdw-1.1.0/ogr_fdw.c   2021-02-01 18:55:33.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/ogr_fdw.c   2023-05-23 03:06:56.000000000 +0200
@@ -7,6 +7,10 @@
  *
  *-------------------------------------------------------------------------
  */
+/*
+* PostgreSQL
+*/
+#include "postgres.h"
 
 /*
  * System
@@ -14,7 +18,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#include "postgres.h"
 
 /*
  * Require PostgreSQL >= 9.3
@@ -130,9 +133,17 @@
 /*
  * FDW modify callback routines
  */
+#if PG_VERSION_NUM >= 140000
+static void ogrAddForeignUpdateTargets(PlannerInfo* planinfo,
+                                       unsigned int rte_index,
+                                       RangeTblEntry* target_rte,
+                                       Relation target_relation);
+#else
 static void ogrAddForeignUpdateTargets(Query* parsetree,
                                        RangeTblEntry* target_rte,
                                        Relation target_relation);
+#endif
+
 static void ogrBeginForeignModify(ModifyTableState* mtstate,
                                   ResultRelInfo* rinfo,
                                   List* fdw_private,
@@ -499,6 +510,8 @@
 static void
 ogrFinishConnection(OgrConnection* ogr)
 {
+       elog(DEBUG3, "%s: entered function", __func__);
+
        if (ogr->lyr && OGR_L_SyncToDisk(ogr->lyr) != OGRERR_NONE)
        {
                elog(NOTICE, "failed to flush writes to OGR data source");
@@ -520,6 +533,8 @@
        ListCell* cell;
        OGRErr err;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Null all values */
        memset(&ogr, 0, sizeof(OgrConnection));
        ogr.ds_updateable = OGR_UPDATEABLE_UNSET;
@@ -600,12 +615,16 @@
        ListCell* cell;
        OgrConnection ogr;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Gather all data for the foreign table. */
        table = GetForeignTable(foreigntableid);
        /* mapping = GetUserMapping(GetUserId(), table->serverid); */
 
        ogr = ogrGetConnectionFromServer(table->serverid, updateable);
 
+       elog(DEBUG3, "%s: ogr.ds_str = %s", __func__, ogr.ds_str);
+
        foreach (cell, table->options)
        {
                DefElem* def = (DefElem*) lfirst(cell);
@@ -639,6 +658,8 @@
                elog(ERROR, "FDW table '%s' option is missing", OPT_LAYER);
        }
 
+       elog(DEBUG3, "%s: ogr.lyr_str = %s", __func__, ogr.lyr_str);
+
        /* Does the layer exist in the data source? */
        ogr.lyr = GDALDatasetGetLayerByName(ogr.ds, ogr.lyr_str);
        if (!ogr.lyr)
@@ -847,6 +868,8 @@
        OgrFdwPlanState* planstate = (OgrFdwPlanState*)state;
        List* scan_clauses = baserel->baserestrictinfo;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Set to NULL to clear the restriction clauses in OGR */
        OGR_L_SetIgnoredFields(planstate->ogr.lyr, NULL);
        OGR_L_SetSpatialFilter(planstate->ogr.lyr, NULL);
@@ -905,6 +928,8 @@
 {
        OgrFdwPlanState* planstate = (OgrFdwPlanState*)(baserel->fdw_private);
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* TODO: replace this with something that looks at the OGRDriver and */
        /* makes a determination based on that? Better: add connection caching 
*/
        /* so that slow startup doesn't matter so much */
@@ -1005,6 +1030,8 @@
        OgrFdwSpatialFilter* spatial_filter = NULL;
        char* attribute_filter = NULL;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Add in column mapping data to build SQL with the right OGR column 
names */
        ogrReadColumnData(state);
 
@@ -1532,11 +1559,17 @@
                return InvalidOid;
        }
 
+#if PG_VERSION_NUM < 160000
        names = stringToQualifiedNameList(proname);
+#else
+       names = stringToQualifiedNameList(proname,NULL);
+#endif
 #if PG_VERSION_NUM < 90400
        clist = FuncnameGetCandidates(names, -1, NIL, false, false);
-#else
+#elif PG_VERSION_NUM < 140000
        clist = FuncnameGetCandidates(names, -1, NIL, false, false, false);
+#else
+       clist = FuncnameGetCandidates(names, -1, NIL, false, false, false, 
false);
 #endif
        if (streq(proname, "st_setsrid"))
        {
@@ -1573,6 +1606,8 @@
        Oid foreigntableid = RelationGetRelid(node->ss.ss_currentRelation);
        ForeignScan* fsplan = (ForeignScan*)node->ss.ps.plan;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Do nothing in EXPLAIN (no ANALYZE) case */
        if (eflags & EXEC_FLAG_EXPLAIN_ONLY)
                return;
@@ -1891,7 +1926,7 @@
                                         */
                                        const char* cstr_in = 
OGR_F_GetFieldAsString(feat, ogrfldnum);
                                        size_t cstr_len = cstr_in ? 
strlen(cstr_in) : 0;
-                                       if (cstr_in && cstr_len > 0)
+                                       if (cstr_in && (cstr_len > 0 || 
ogrfldtype == OFTString))
                                        {
                                                char* cstr_decoded;
                                                if 
(execstate->ogr.char_encoding)
@@ -2327,6 +2362,8 @@
        TupleTableSlot* slot = node->ss.ss_ScanTupleSlot;
        OGRFeatureH feat;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /*
         * Clear the slot. If it gets through w/o being filled up, that means
         * we're all done.
@@ -2374,6 +2411,7 @@
 ogrReScanForeignScan(ForeignScanState* node)
 {
        OgrFdwExecState* execstate = (OgrFdwExecState*) node->fdw_state;
+       elog(DEBUG3, "%s: entered function", __func__);
 
        OGR_L_ResetReading(execstate->ogr.lyr);
        execstate->rownum = 0;
@@ -2389,6 +2427,7 @@
 ogrEndForeignScan(ForeignScanState* node)
 {
        OgrFdwExecState* execstate = (OgrFdwExecState*) node->fdw_state;
+       elog(DEBUG3, "%s: entered function", __func__);
        if (execstate)
        {
                elog(DEBUG2, "OGR FDW processed %d rows from OGR", 
execstate->rownum);
@@ -2454,6 +2493,40 @@
  * there could always be a virtual fid travelling with the queries,
  * and the FDW table itself wouldn't need such a column?
  */
+
+#if PG_VERSION_NUM >= 140000
+static void
+ogrAddForeignUpdateTargets(PlannerInfo* planinfo,
+                           unsigned int rte_index,
+                           RangeTblEntry* target_rte,
+                           Relation target_relation)
+{
+       Query* parsetree = planinfo->parse;
+       Form_pg_attribute att;
+       Var* var;
+       TupleDesc tupdesc = target_relation->rd_att;
+       int fid_column = ogrGetFidColumn(tupdesc);
+
+       elog(DEBUG3, "%s: entered function", __func__);
+
+       if (fid_column < 0)
+       {
+               elog(ERROR, "table '%s' does not have a 'fid' column", 
RelationGetRelationName(target_relation));
+       }
+
+       att = &tupdesc->attrs[fid_column];
+       /* Make a Var representing the desired value */
+       var = makeVar(parsetree->resultRelation,
+                     att->attnum,
+                     att->atttypid,
+                     att->atttypmod,
+                     att->attcollation,
+                     0);
+
+       add_row_identity_var(planinfo, var, rte_index, "fid");
+}
+#else /* PG_VERSION_NUM < 140000 */
+
 static void
 ogrAddForeignUpdateTargets(Query* parsetree,
                            RangeTblEntry* target_rte,
@@ -2466,7 +2539,7 @@
        TupleDesc tupdesc = target_relation->rd_att;
        int fid_column = ogrGetFidColumn(tupdesc);
 
-       elog(DEBUG2, "ogrAddForeignUpdateTargets");
+       elog(DEBUG3, "%s: entered function", __func__);
 
        if (fid_column < 0)
        {
@@ -2499,10 +2572,10 @@
                TargetEntry* target = (TargetEntry*) lfirst(cell);
                elog(DEBUG4, "parsetree->targetList %s:%d", target->resname, 
target->resno);
        }
+}
+#endif
 
-       return;
 
-}
 
 /*
  * ogrBeginForeignModify
@@ -2519,7 +2592,7 @@
        Oid foreigntableid;
        OgrFdwState* state;
 
-       elog(DEBUG2, "ogrBeginForeignModify");
+       elog(DEBUG3, "%s: entered function", __func__);
 
        foreigntableid = RelationGetRelid(rinfo->ri_RelationDesc);
        state = getOgrFdwState(foreigntableid, OGR_MODIFY_STATE);
@@ -2554,6 +2627,8 @@
        OGRFeatureH feat;
        OGRErr err;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Is there a fid column? */
        fid_column = ogrGetFidColumn(td);
        if (fid_column < 0)
@@ -2726,7 +2801,7 @@
        OGRErr err;
        GIntBig fid;
 
-       elog(DEBUG2, "ogrExecForeignInsert");
+       elog(DEBUG3, "%s: entered function", __func__);
 
 #if PG_VERSION_NUM >= 120000
        /*
@@ -2789,6 +2864,8 @@
        int64 fid;
        OGRErr err;
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Is there a fid column? */
        fid_column = ogrGetFidColumn(td);
        if (fid_column < 0)
@@ -2837,7 +2914,7 @@
 {
        OgrFdwModifyState* modstate = rinfo->ri_FdwState;
 
-       elog(DEBUG2, "ogrEndForeignModify");
+       elog(DEBUG3, "%s: entered function", __func__);
 
        ogrFinishConnection(&(modstate->ogr));
 
@@ -2853,7 +2930,7 @@
        OgrConnection ogr;
        Oid foreigntableid = RelationGetRelid(rel);
 
-       elog(DEBUG2, "ogrIsForeignRelUpdatable");
+       elog(DEBUG3, "%s: entered function", __func__);
 
        /* Before we say "yes"... */
        /*  Does the foreign relation have a "fid" column? */
@@ -2871,7 +2948,7 @@
        /* Something in the open process set the readonly flags */
        /* Perhaps user has manually set the foreign table option to readonly */
        if (ogr.ds_updateable == OGR_UPDATEABLE_FALSE ||
-               ogr.lyr_updateable == OGR_UPDATEABLE_FALSE)
+           ogr.lyr_updateable == OGR_UPDATEABLE_FALSE)
        {
                return readonly;
        }
@@ -2920,6 +2997,8 @@
        char layer_name[STR_MAX_LEN];
        char table_name[STR_MAX_LEN];
 
+       elog(DEBUG3, "%s: entered function", __func__);
+
        /* Are we importing all layers in the OGR datasource? */
        import_all = streq(stmt->remote_schema, "ogr_all");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/ogr_fdw.h 
new/pgsql-ogr-fdw-1.1.4/ogr_fdw.h
--- old/pgsql-ogr-fdw-1.1.0/ogr_fdw.h   2021-02-01 18:55:33.000000000 +0100
+++ new/pgsql-ogr-fdw-1.1.4/ogr_fdw.h   2023-05-23 03:06:56.000000000 +0200
@@ -61,6 +61,11 @@
 #include "optimizer/var.h"
 #else
 #include "executor/tuptable.h"
+#include "optimizer/appendinfo.h"
+#endif
+
+#ifdef PACKAGE_URL
+#undef PACKAGE_URL
 #endif
 
 /* GDAL/OGR includes and compat */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/ogr_fdw_common.c 
new/pgsql-ogr-fdw-1.1.4/ogr_fdw_common.c
--- old/pgsql-ogr-fdw-1.1.0/ogr_fdw_common.c    2021-02-01 18:55:33.000000000 
+0100
+++ new/pgsql-ogr-fdw-1.1.4/ogr_fdw_common.c    2023-05-23 03:06:56.000000000 
+0200
@@ -199,6 +199,7 @@
 #endif
                case wkbNone:
                        CPLError(CE_Failure, CPLE_AssertionFailed, "Cannot 
handle OGR geometry type wkbNone");
+                       break;
                default:
                        CPLError(CE_Failure, CPLE_AssertionFailed, "Cannot 
handle OGR geometry type '%d'", gtype);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/ogr_fdw_func.c 
new/pgsql-ogr-fdw-1.1.4/ogr_fdw_func.c
--- old/pgsql-ogr-fdw-1.1.0/ogr_fdw_func.c      2021-02-01 18:55:33.000000000 
+0100
+++ new/pgsql-ogr-fdw-1.1.4/ogr_fdw_func.c      2023-05-23 03:06:56.000000000 
+0200
@@ -36,6 +36,7 @@
        bool elem_byval;
        char elem_align;
        int num_drivers;
+       int i;
 
        if (GDALGetDriverCount() <= 0)
                GDALAllRegister();
@@ -52,7 +53,6 @@
        arr_elems = palloc0(num_drivers * sizeof(Datum));
     get_typlenbyvalalign(elem_type, &elem_len, &elem_byval, &elem_align);
 
-       int i;
        for (i = 0; i < num_drivers; i++) {
 #if GDAL_VERSION_MAJOR <= 1
                OGRSFDriverH hDriver = OGRGetDriver(i);
@@ -82,8 +82,7 @@
        const char *ogr_fdw_ver = OGR_FDW_RELEASE_NAME;
        char ver_str[256];
        snprintf(ver_str, sizeof(ver_str), "OGR_FDW=\"%s\" GDAL=\"%s\"", 
ogr_fdw_ver, gdal_ver);
-       text* ver_txt = cstring_to_text(ver_str);
-       PG_RETURN_TEXT_P(ver_txt);
+       PG_RETURN_TEXT_P(cstring_to_text(ver_str));
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/ogr_fdw_info.c 
new/pgsql-ogr-fdw-1.1.4/ogr_fdw_info.c
--- old/pgsql-ogr-fdw-1.1.0/ogr_fdw_info.c      2021-02-01 18:55:33.000000000 
+0100
+++ new/pgsql-ogr-fdw-1.1.4/ogr_fdw_info.c      2023-05-23 03:06:56.000000000 
+0200
@@ -133,9 +133,11 @@
                "       Show what input file formats are supported.\n"
                "\n");
        printf(
-               "note (1): You can specify either -l (layer name) or -i (layer 
index) if you specify both -l will be used\n"
+               "note (1): You can specify either -l (layer name) or -i (layer 
index)\n"
+               "          if you specify both -l will be used\n"
                "note (2): config options are specified as a comma deliminated 
list without the OGR_<driver>_ prefix\n"
-               "so OGR_XLSX_HEADERS = FORCE OGR_XLSX_FIELD_TYPES = STRING 
would become:\n\"HEADERS = FORCE,FIELD_TYPES = STRING\""
+               "          so OGR_XLSX_HEADERS = FORCE OGR_XLSX_FIELD_TYPES = 
STRING would become:\n"
+               "          \"HEADERS = FORCE,FIELD_TYPES = STRING\""
                "\n");
        exit(0);
 }
@@ -155,7 +157,7 @@
                usage();
        }
 
-       while ((ch = getopt(argc, argv, "h?s:l:f:t:n:i:o:")) != -1)
+       while ((ch = getopt(argc, argv, "hfs:l:t:n:i:o:")) != -1)
        {
                switch (ch)
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pgsql-ogr-fdw-1.1.0/stringbuffer.c 
new/pgsql-ogr-fdw-1.1.4/stringbuffer.c
--- old/pgsql-ogr-fdw-1.1.0/stringbuffer.c      2021-02-01 18:55:33.000000000 
+0100
+++ new/pgsql-ogr-fdw-1.1.4/stringbuffer.c      2023-05-23 03:06:56.000000000 
+0200
@@ -11,6 +11,11 @@
 
 #include "stringbuffer.h"
 
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
+
 /**
 * Allocate a new stringbuffer_t. Use stringbuffer_destroy to free.
 */

Reply via email to