2026-10-11 14:45:57

This commit is contained in:
support committed 2026-10-11 16:45:57 +02:00
1 parent ce49d78f31
commit fbf826bf0c
12 files changed
+512 -57

No files matched your search

+22 -3
View File
@@ -10,11 +10,16 @@ readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
readonly PGVECTOR_REPOSITORY="${PGVECTOR_REPOSITORY:-pgvector/pgvector}"
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
readonly POSTGRES_VERSION="$1"
if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
show_help "$0" "Build and install pgvector for an existing PostgreSQL installation."
exit 0
fi
POSTGRES_VERSION="$(parse_postgresql_version "$@")"
readonly POSTGRES_VERSION
validate_postgresql_version "$POSTGRES_VERSION"
require_tools curl tar make
readonly PREFIX="$POSTGRES_ROOT/$POSTGRES_VERSION"
readonly PREFIX="${PREFIX:-$POSTGRES_ROOT/$POSTGRES_VERSION}"
readonly PG_CONFIG="$PREFIX/bin/pg_config"
require_postgresql_installation "$PREFIX"
reset_staging_dir "$STAGING_DIR"
@@ -32,3 +37,17 @@ make -j"${JOBS:-$(nproc)}" PG_CONFIG="$PG_CONFIG"
make install PG_CONFIG="$PG_CONFIG"
test -f "$PREFIX/lib/vector.so"
test -f "$PREFIX/share/extension/vector.control"
readonly SAVED_SOURCE_DIR="$(copy_install_source "$PGVECTOR_DIR" "$PREFIX" "pgvector-$PGVECTOR_TAG")"
write_install_recipe "$SAVED_SOURCE_DIR" "$POSTGRES_VERSION" "$PREFIX" <<'RECIPE'
cd "$SCRIPT_DIR"
# Configure
# pgvector uses PGXS directly and does not require a separate configure step.
# Make
make -j"$JOBS" PG_CONFIG="$PG_CONFIG"
# Make install
make install PG_CONFIG="$PG_CONFIG"
RECIPE