Skip to content

Commit 21ab82b

Browse files
committed
odbc_fdw: Add a patch to fix builds against PostgreSQL 17 per CartoDB/odbc_fdw#143 . While passing update LLVM dependencies
1 parent 52e3149 commit 21ab82b

8 files changed

Lines changed: 32 additions & 4 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../main/odbc_fdw-pg17.patch
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- odbc_fdw.c.old 2025-01-04 00:36:30.080601572 +0300
2+
+++ odbc_fdw.c 2025-01-04 00:36:41.540786940 +0300
3+
@@ -1291,6 +1291,9 @@
4+
NIL, /* no pathkeys */
5+
NULL, /* no outer rel either */
6+
NULL, /* no extra plan */
7+
+#if PG_VERSION_NUM >= 170000
8+
+ NIL, /* no fdw_restrictinfo list */
9+
+#endif
10+
NIL /* no fdw_private list */));
11+
12+
elog_debug("----> finishing %s", __func__);

rpm/redhat/main/non-common/odbc_fdw/main/odbc_fdw.spec

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
Summary: ODBC Foreign Data Wrapper for PostgreSQL
66
Name: %{sname}_%{pgmajorversion}
77
Version: 0.5.1
8-
Release: 1PGDG%{?dist}
8+
Release: 2PGDG%{?dist}
99
License: PostgreSQL
1010
URL: https://github.com/CartoDB/%{sname}
1111
Source0: https://github.com/CartoDB/%{sname}/archive/refs/tags/%{version}.tar.gz
12-
BuildRequires: postgresql%{pgmajorversion}-devel pgdg-srpm-macros
12+
%if %{pgmajorversion} == 17
13+
Patch0: %{sname}-pg17.patch
14+
%endif
15+
BuildRequires: postgresql%{pgmajorversion}-devel
1316
BuildRequires: postgresql%{pgmajorversion}-server
1417
Requires: postgresql%{pgmajorversion}-server
1518

@@ -26,8 +29,8 @@ BuildRequires: llvm17-devel clang17-devel
2629
Requires: llvm17
2730
%endif
2831
%if 0%{?fedora} || 0%{?rhel} >= 8
29-
BuildRequires: llvm-devel >= 13.0 clang-devel >= 13.0
30-
Requires: llvm => 13.0
32+
BuildRequires: llvm-devel >= 17.0 clang-devel >= 17.0
33+
Requires: llvm => 17.0
3134
%endif
3235

3336
%description llvmjit
@@ -36,6 +39,9 @@ This packages provides JIT support for odbc_fdw
3639

3740
%prep
3841
%setup -q -n %{sname}-%{version}
42+
%if %{pgmajorversion} == 17
43+
%patch -P 0 -p0
44+
%endif
3945

4046
%build
4147

@@ -63,5 +69,9 @@ USE_PGXS=1 PATH=%{pginstdir}/bin/:$PATH %{__make} %{?_smp_mflags} install DESTDI
6369
%endif
6470

6571
%changelog
72+
* Fri Jan 3 2025 Devrim Gündüz <devrim@gunduz.org> - 0.5.1-2PGDG
73+
- Add a patch to fix builds against PostgreSQL 17 per
74+
https://github.com/CartoDB/odbc_fdw/pull/143
75+
6676
* Thu Aug 22 2024 Devrim Gündüz <devrim@gunduz.org> - 0.5.1-1PGDG
6777
- Initial packaging for the PostgreSQL RPM repositories.

0 commit comments

Comments
 (0)