Skip to content

Commit

Permalink
Fixed incorrect version display of pg_bulkload (#142) #141
Browse files Browse the repository at this point in the history
* Fixed incorrect version display of pg_bulkload

Previously, pg_bulkload always showed the wrong version 
after registering to the DB. It will confuses users.
So, changed the method of generating pg_bulkload--${version}.sql and
getting the version number of pg_bulkload.
Reported-by : cesarjorgemartinez

* Removed unnecessary file

pg_bulkload does not support upgrades using ALTER EXTENSION,
and since PostgreSQL 9.2, pg_bulkload is registered to DB using 
CREATE EXTENSION. So. we removed the manual registration method.

* Added the description how to upgrade pg_bulkload.

* Removed unnecessary lines from the Makefile and SPECS file

Removed PostgreSQL 9.6 SPEC file.

---------

Co-authored-by: mikecaat <35882227+mikecaat@users.noreply.github.com>
Co-authored-by: Masahiro Ikeda <masahiro.ikeda.us@hco.ntt.co.jp>
  • Loading branch information
3 people authored Feb 8, 2023
1 parent 3cf3e02 commit c5b508e
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 242 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ bin/results

# Some more
lib/exports.list
lib/pg_bulkload.sql
lib/pg_bulkload--*.sql
lib/pg_bulkload.control
util/pg_timestamp.sql
10 changes: 2 additions & 8 deletions SPECS/pg_bulkload-pg10.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ install -m 755 bin/pg_bulkload %{buildroot}%{_bindir}/pg_bulkloa
install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -69,13 +66,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%clean
rm -rf %{buildroot}
Expand Down
12 changes: 3 additions & 9 deletions SPECS/pg_bulkload-pg11.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql11-server, postgresql11-llvmjit
Requires: pg_bulkload = 3.1.20
Requires: pg_bulkload = %{version}
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -62,11 +62,8 @@ install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -80,13 +77,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%files llvmjit
%defattr(0755,root,root)
Expand Down
12 changes: 3 additions & 9 deletions SPECS/pg_bulkload-pg12.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql12-server, postgresql12-llvmjit
Requires: pg_bulkload = 3.1.20
Requires: pg_bulkload = %{version}
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -62,11 +62,8 @@ install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -80,13 +77,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%files llvmjit
%defattr(0755,root,root)
Expand Down
12 changes: 3 additions & 9 deletions SPECS/pg_bulkload-pg13.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql13-server, postgresql13-llvmjit
Requires: pg_bulkload = 3.1.20
Requires: pg_bulkload = %{version}
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -62,11 +62,8 @@ install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -80,13 +77,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%files llvmjit
%defattr(0755,root,root)
Expand Down
12 changes: 3 additions & 9 deletions SPECS/pg_bulkload-pg14.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql14-server, postgresql14-llvmjit
Requires: pg_bulkload = 3.1.20
Requires: pg_bulkload = %{version}
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -62,11 +62,8 @@ install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -80,13 +77,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%files llvmjit
%defattr(0755,root,root)
Expand Down
12 changes: 3 additions & 9 deletions SPECS/pg_bulkload-pg15.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When we load huge amount of data to a database, it is common situation that data

%package llvmjit
Requires: postgresql15-server, postgresql15-llvmjit
Requires: pg_bulkload = 3.1.20
Requires: pg_bulkload = %{version}
Summary: Just-in-time compilation support for pg_bulkload

%description llvmjit
Expand Down Expand Up @@ -62,11 +62,8 @@ install -m 755 bin/postgresql %{buildroot}%{_bindir}/postgresql
install -m 755 lib/pg_bulkload.so %{buildroot}%{_libdir}/pg_bulkload.so
install -m 644 lib/pg_bulkload.bc %{buildroot}%{_bcdir}/pg_bulkload.bc

install -m 644 lib/pg_bulkload.sql %{buildroot}%{pg_contribdir}/pg_bulkload.sql
install -m 644 lib/uninstall_pg_bulkload.sql %{buildroot}%{pg_contribdir}/uninstall_pg_bulkload.sql
install -m 644 lib/pg_bulkload.control %{buildroot}%{pg_extensiondir}/pg_bulkload.control
install -m 644 lib/pg_bulkload--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--1.0.sql
install -m 644 lib/pg_bulkload--unpackaged--1.0.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
install -m 644 lib/pg_bulkload--%{version}.sql %{buildroot}%{pg_extensiondir}/pg_bulkload--%{version}.sql

# sample_*.ctl files are needed for rpm users.
# %{sname}-%{version} is the same path with "%setup -n"'s argument.
Expand All @@ -80,13 +77,10 @@ install -m 644 docs/sample_csv.ctl %{buildroot}%{pg_contribdir}/sam
%{_libdir}/pg_bulkload.so
%defattr(644,root,root,755)
#%doc README.pg_bulkload
%{pg_contribdir}/pg_bulkload.sql
%{pg_contribdir}/uninstall_pg_bulkload.sql
%{pg_contribdir}/sample_bin.ctl
%{pg_contribdir}/sample_csv.ctl
%{pg_extensiondir}/pg_bulkload.control
%{pg_extensiondir}/pg_bulkload--1.0.sql
%{pg_extensiondir}/pg_bulkload--unpackaged--1.0.sql
%{pg_extensiondir}/pg_bulkload--%{version}.sql

%files llvmjit
%defattr(0755,root,root)
Expand Down
117 changes: 0 additions & 117 deletions SPECS/pg_bulkload-pg96.spec

This file was deleted.

Loading

0 comments on commit c5b508e

Please sign in to comment.