Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: add pg_search #499

Closed
wants to merge 9 commits into from
Closed
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
28 changes: 28 additions & 0 deletions contrib/pg_search/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG PG_VERSION=15
FROM quay.io/coredb/pgrx-builder:pg${PG_VERSION}-pgrx0.9.7
USER root

ARG RELEASE=v0.2.21

# Extension build dependencies
RUN apt-get update && apt-get install -y \
build-essential
Comment on lines +8 to +9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these not already in pgrx-builder:pg?


# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

# Set default Rust version
RUN /root/.cargo/bin/rustup default stable && /root/.cargo/bin/rustup override set 1.73.0

# Clone repository
RUN git clone https://github.com/paradedb/paradedb.git && \
cd paradedb && \
git fetch --tags && \
git fetch --depth 1 origin tag ${RELEASE} && \
git checkout ${RELEASE}

# Build the extension
RUN cd paradedb && \
cd pg_search && \
cargo pgrx init --pg15 /usr/bin/pg_config && \
cargo pgrx package
22 changes: 22 additions & 0 deletions contrib/pg_search/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[extension]
name = "pg_search"
version = "0.4.0"
repository = "https://github.com/paradedb/paradedb/tree/dev/pg_search"
license = "AGPL-3.0"
description = "Hybrid search for PostgreSQL"
homepage = "https://www.paradedb.com/"
documentation = "https://github.com/paradedb/paradedb/tree/dev/pg_search"
categories = ["search"]

[dependencies]
apt = ["libc6"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd paradedb/
mv target/release/pg_search-pg15/usr/lib/postgresql/15/lib/* /usr/lib/postgresql/15/lib
mv target/release/pg_search-pg15/usr/share/postgresql/15/extension/* /usr/share/postgresql/15/extension
"""