Skip to content

Commit

Permalink
add pg_trgm (#228)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Stanton <evanstanton@Evans-MBP.fritz.box>
  • Loading branch information
EvanHStanton and Evan Stanton authored Jul 19, 2023
1 parent f84e098 commit c36d929
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
28 changes: 28 additions & 0 deletions contrib/pg_trgm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG PG_VERSION=15
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
zlib1g-dev \
flex bison \
libxml2-dev \
libxslt-dev \
libssl-dev \
libxml2-utils \
xsltproc \
ccache

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

ARG PG_VERSION=15

RUN cd postgres && \
git fetch origin REL_${PG_VERSION}_STABLE && \
git checkout REL_${PG_VERSION}_STABLE && \
./configure && \
cd contrib/pg_trgm && \
make
21 changes: 21 additions & 0 deletions contrib/pg_trgm/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[extension]
name = "pg_trgm"
version = "1.6.0"
repository = "https://github.com/postgres/postgres/tree/master/contrib/pg_trgm"
license = "PostgreSQL"
description = "Text similarity measurement and index searching based on trigrams."
homepage = "https://www.postgresql.org"
documentation = "https://www.postgresql.org/docs/current/pgtrgm.html"
categories = ["search"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres/contrib/pg_trgm && make install
set -x
mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension
mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib
"""

0 comments on commit c36d929

Please sign in to comment.