Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
strategy:
matrix:
PGVERSION: # TODO: build with master branch
- "18"
- "17"
- "16"
- "15"
- "14"
- "13"

env:
CACHE_VERSION: 20221222 # to identify cache version
CACHE_VERSION: 20251204 # to identify cache version

steps:
- name: cat version
Expand Down Expand Up @@ -65,6 +65,7 @@ jobs:
libselinux-dev \
libedit-dev \
liblz4-dev \
libnuma-dev \
zlib1g-dev \
postgresql-${{ env.PGVERSION }} \
postgresql-server-dev-${{ env.PGVERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
RHEL_VERSION: ["8", "9", "10"]
PG_VERSION: ["13", "14", "15", "16", "17"]
PG_VERSION: ["14", "15", "16", "17", "18"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
strategy:
matrix:
PGVERSION: # TODO: build with master branch
- "17.2"
- "16.6"
- "15.10"
- "14.15"
- "13.18"
- "18.1"
- "17.7"
- "16.11"
- "15.15"
- "14.20"

env:
CACHE_VERSION: 20221222 # to identify cache version
CACHE_VERSION: 20251204 # to identify cache version

steps:
- name: cat version
Expand Down
25 changes: 18 additions & 7 deletions bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ sql/init-16.sql:
cp sql/init-extension-v3.sql sql/init-16.sql
sql/init-17.sql:
cp sql/init-extension-v3.sql sql/init-17.sql
sql/init-18.sql:
cp sql/init-extension-v3.sql sql/init-18.sql

sql/load_bin.sql: sql/load_bin-$(MAJORVERSION).sql
cp sql/load_bin-$(MAJORVERSION).sql sql/load_bin.sql
Expand Down Expand Up @@ -97,6 +99,8 @@ sql/load_bin-16.sql:
cp sql/load_bin-v2.sql sql/load_bin-16.sql
sql/load_bin-17.sql:
cp sql/load_bin-v2.sql sql/load_bin-17.sql
sql/load_bin-18.sql:
cp sql/load_bin-v2.sql sql/load_bin-18.sql

sql/load_csv.sql: sql/load_csv-$(MAJORVERSION).sql
cp sql/load_csv-$(MAJORVERSION).sql sql/load_csv.sql
Expand Down Expand Up @@ -124,6 +128,8 @@ sql/load_csv-16.sql:
cp sql/load_csv-v3.sql sql/load_csv-16.sql
sql/load_csv-17.sql:
cp sql/load_csv-v3.sql sql/load_csv-17.sql
sql/load_csv-18.sql:
cp sql/load_csv-v3.sql sql/load_csv-18.sql

sql/load_filter.sql: sql/load_filter-$(MAJORVERSION).sql
cp sql/load_filter-$(MAJORVERSION).sql sql/load_filter.sql
Expand Down Expand Up @@ -151,7 +157,8 @@ sql/load_filter-16.sql:
cp sql/load_filter-v3.sql sql/load_filter-16.sql
sql/load_filter-17.sql:
cp sql/load_filter-v3.sql sql/load_filter-17.sql

sql/load_filter-18.sql:
cp sql/load_filter-v3.sql sql/load_filter-18.sql

sql/load_function.sql: sql/load_function-$(MAJORVERSION).sql
cp sql/load_function-$(MAJORVERSION).sql sql/load_function.sql
Expand Down Expand Up @@ -179,6 +186,8 @@ sql/load_function-16.sql:
cp sql/load_function-v3.sql sql/load_function-16.sql
sql/load_function-17.sql:
cp sql/load_function-v3.sql sql/load_function-17.sql
sql/load_function-18.sql:
cp sql/load_function-v3.sql sql/load_function-18.sql

sql/write_bin.sql: sql/write_bin-$(MAJORVERSION).sql
cp sql/write_bin-$(MAJORVERSION).sql sql/write_bin.sql
Expand Down Expand Up @@ -206,17 +215,19 @@ sql/write_bin-16.sql:
cp sql/write_bin-v2.sql sql/write_bin-16.sql
sql/write_bin-17.sql:
cp sql/write_bin-v2.sql sql/write_bin-17.sql
sql/write_bin-18.sql:
cp sql/write_bin-v2.sql sql/write_bin-18.sql

.PHONY: subclean
clean: subclean

subclean:
rm -f sql/init.sql sql/init-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/load_bin.sql sql/load_bin-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/load_csv.sql sql/load_csv-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/load_filter.sql sql/load_filter-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/load_function.sql sql/load_function-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/write_bin.sql sql/write_bin-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17}.sql
rm -f sql/init.sql sql/init-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql
rm -f sql/load_bin.sql sql/load_bin-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql
rm -f sql/load_csv.sql sql/load_csv-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql
rm -f sql/load_filter.sql sql/load_filter-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql
rm -f sql/load_function.sql sql/load_function-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql
rm -f sql/write_bin.sql sql/write_bin-{9.3,9.4,9.5,9.6,10,11,12,13,14,15,16,17,18}.sql

installcheck: sql/init.sql sql/load_bin.sql sql/load_csv.sql sql/load_function.sql sql/load_filter.sql sql/write_bin.sql

Expand Down
2 changes: 1 addition & 1 deletion include/pg_bulkload.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef Parser *(*ParserCreate)(void);
#endif
#endif

#ifdef HAVE_LONG_INT_64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pg17まだ#ifdef HAVE_LONG_INT_64利用しているようですね
https://github.com/postgres/postgres/blob/498b163a161e2a545a327ae5604682d5e00f3dfa/src/include/c.h#L520

こちらの修正を見ると、正しいように見えます
Use <stdint.h> and <inttypes.h> for c.h integers.

分岐とか入れたほうがよさそうですかね?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SIZEOF_LONG is defined at ./configure, regardless of the PostgreSQL version. Therefore, it is safe to use #if SIZEOF_LONG == 8 in any version of PostgreSQL.

#if SIZEOF_LONG == 8
#define int64_FMT "%ld"
#else
#define int64_FMT "%lld"
Expand Down
Loading