Skip to content

Commit 4b0e2f7

Browse files
committed
Add sql_saga extension for temporal tables with foreign keys
1 parent 7db7e1a commit 4b0e2f7

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ ARG pg_tle_release=1.3.2
3838
ARG index_advisor_release=0.2.0
3939
ARG supautils_release=2.2.1
4040
ARG wal_g_release=2.0.1
41+
ARG sql_saga_release=c65b6f850f3d123003b073fa59c666f1d44e7021
4142

4243
####################
4344
# Setup Postgres PPA
@@ -818,6 +819,22 @@ RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccac
818819
# Create debian package
819820
RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc
820821

822+
823+
####################
824+
# 31-sql_saga.yml
825+
####################
826+
FROM ccache as sql_saga-source
827+
# Download and extract
828+
ARG sql_saga_release
829+
ADD "https://github.com/veridit/sql_saga.git#${sql_saga_release}" \
830+
/tmp/sql_saga-${sql_saga_release}
831+
# Build from source
832+
WORKDIR /tmp/sql_saga-${sql_saga_release}
833+
RUN make -j$(nproc)
834+
# Create debian package
835+
RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc
836+
837+
821838
####################
822839
# internal/supautils.yml
823840
####################
@@ -899,6 +916,7 @@ COPY --from=pgvector-source /tmp/*.deb /tmp/
899916
COPY --from=pg_tle-source /tmp/*.deb /tmp/
900917
COPY --from=index_advisor /tmp/*.deb /tmp/
901918
COPY --from=supautils /tmp/*.deb /tmp/
919+
COPY --from=sql_saga-source /tmp/*.deb /tmp/
902920

903921
####################
904922
# Download gosu for easy step-down from root

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to
3232
| [pgsodium](https://github.com/michelp/pgsodium) | [3.1.0](https://github.com/michelp/pgsodium/releases/tag/2.0.0) | Modern encryption API using libsodium. |
3333
| [pg_stat_monitor](https://github.com/percona/pg_stat_monitor) | [1.0.1](https://github.com/percona/pg_stat_monitor/releases/tag/1.0.1) | Query Performance Monitoring Tool for PostgreSQL
3434
| [pgvector](https://github.com/pgvector/pgvector) | [v0.4.0](https://github.com/pgvector/pgvector/releases/tag/v0.4.0) | Open-source vector similarity search for Postgres
35+
| [pg_repack](https://github.com/reorg/pg_repack) | [ver_1.4.8](https://github.com/reorg/pg_repack/releases/tag/ver_1.4.8) | Tool to remove bloat from tables and indexes
36+
| [sql_saga](https://github.com/veridit/sql_saga) | [commit](https://github.com/veridit/sql_saga/commit/daf4be43d232d18bc31079ef8440b2e4758f0742) | Generate unique identifiers from numbers. |
3537

3638

3739
Can't find your favorite extension? Suggest for it to be added into future releases [here](https://github.com/supabase/supabase/discussions/679)!
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# sql_saga
2+
- name: sql_saga - download from master branch
3+
git:
4+
repo: https://github.com/veridit/sql_saga.git
5+
dest: /tmp/sql_saga
6+
version: "{{ sql_saga_release }}"
7+
8+
- name: sql_saga - build
9+
make:
10+
chdir: /tmp/sql_saga
11+
become: yes
12+
13+
- name: sql_saga - install
14+
make:
15+
chdir: /tmp/sql_saga
16+
target: install
17+
become: yes
18+
19+
- name: sql_saga - cleanup
20+
file:
21+
state: absent
22+
path: /tmp/sql_saga
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BEGIN;
2+
create extension if not exists btree_gist;
3+
create extension if not exists sql_saga;
4+
ROLLBACK;

0 commit comments

Comments
 (0)