Skip to content

Commit eb9e4b1

Browse files
committed
feat: support a pg 14 version of postgres bundle
1 parent 198cf69 commit eb9e4b1

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

nix/postgresql/14.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import ./generic.nix {
2+
version = "14.18";
3+
hash = "sha256-g6sp1r/D3Fiy7TxmQRT9++tqBFDEuNf6aa7pHjyhT44=";
4+
# muslPatches = {
5+
# disable-test-collate-icu-utf8 = {
6+
# url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7";
7+
# hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM=";
8+
# };
9+
# dont-use-locale-a = {
10+
# url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/dont-use-locale-a-on-musl.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7";
11+
# hash = "sha256-fk+y/SvyA4Tt8OIvDl7rje5dLs3Zw+Ln1oddyYzerOo=";
12+
# };
13+
# };
14+
}

nix/tools/run-client.sh.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ print_help() {
1313
echo "Usage: nix run .#start-client -- [options]"
1414
echo
1515
echo "Options:"
16-
echo " -v, --version [15|16|orioledb-16] Specify the PostgreSQL version to use (required)"
16+
echo " -v, --version [14|15|16|orioledb-16] Specify the PostgreSQL version to use (required)"
1717
echo " -u, --user USER Specify the user/role to use (default: postgres)"
1818
echo " -h, --help Show this help message"
1919
echo
@@ -81,7 +81,11 @@ if [[ -z "$PSQL_VERSION" ]]; then
8181
fi
8282

8383
# Determine PostgreSQL version
84-
if [ "$PSQL_VERSION" == "15" ]; then
84+
if [ "$PSQL_VERSION" == "14" ]; then
85+
echo "Starting client for PSQL 14"
86+
PSQL14=@PSQL14_BINDIR@
87+
BINDIR="$PSQL14"
88+
elif [ "$PSQL_VERSION" == "15" ]; then
8589
echo "Starting client for PSQL 15"
8690
PSQL15=@PSQL15_BINDIR@
8791
BINDIR="$PSQL15"

nix/tools/run-server.sh.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ else
141141
PGSODIUM_GETKEY_SCRIPT="${PGSODIUM_GETKEY_SCRIPT:-@PGSODIUM_GETKEY@}"
142142
fi
143143
# Verify version and set binary directory
144-
if [ "$VERSION" == "15" ]; then
144+
145+
if [ "$VERSION" == "14" ]; then
146+
echo "Starting server for PSQL 14"
147+
PSQL14=@PSQL14_BINDIR@
148+
BINDIR="$PSQL14"
149+
elif [ "$VERSION" == "15" ]; then
145150
echo "Starting server for PSQL 15"
146151
PSQL15=@PSQL15_BINDIR@
147152
BINDIR="$PSQL15"
@@ -154,7 +159,7 @@ elif [ "$VERSION" == "orioledb-17" ]; then
154159
PSQLORIOLEDB17=@PSQLORIOLEDB17_BINDIR@
155160
BINDIR="$PSQLORIOLEDB17"
156161
else
157-
echo "Please provide a valid Postgres version (15, 17, orioledb-17)"
162+
echo "Please provide a valid Postgres version (14, 15, 17, orioledb-17)"
158163
exit 1
159164
fi
160165

0 commit comments

Comments
 (0)