Skip to content

Commit

Permalink
Add pg_parquet
Browse files Browse the repository at this point in the history
  • Loading branch information
vrmiguel committed Dec 18, 2024
1 parent e19ed3c commit 7de09de
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
39 changes: 39 additions & 0 deletions contrib/pg_parquet/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ARG PG_VERSION
FROM quay.io/coredb/pgrx-builder:pg${PG_VERSION}-pgrx0.12.9

# Extension build dependencies
USER root
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 \
python3-dev \
clang \
cmake \
libclang-dev \
libopenblas-dev \
libpython3-dev \
pkg-config \
crossbuild-essential-arm64 \
crossbuild-essential-amd64 \
gcc-aarch64-linux-gnu

ARG EXTENSION_NAME
ARG EXTENSION_VERSION
ARG PG_VERSION

# Install Rust and clone & build the extension.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& /root/.cargo/bin/rustup default stable \
&& git clone --depth 1 --branch v${EXTENSION_VERSION} https://github.com/CrunchyData/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& cargo pgrx init --pg${PG_VERSION}=/usr/bin/pg_config \
&& cargo pgrx package
19 changes: 19 additions & 0 deletions contrib/pg_parquet/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[extension]
name = "pg_parquet"
version = "0.2.0"
repository = "https://github.com/CrunchyData/pg_parquet"
license = "PostgreSQL"
description = "Copy to/from Parquet in S3 from within PostgreSQL"
homepage = "https://github.com/CrunchyData/pg_parquet"
documentation = "https://github.com/CrunchyData/pg_parquet"
categories = ["connectors"]
loadable_libraries = [{ library_name = "pg_parquet", requires_restart = true }]

[dependencies]
apt = ["libc6", "libgcc-s1"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = "cd pg_parquet/ && cargo pgrx install --release -c /usr/bin/pg_config"

0 comments on commit 7de09de

Please sign in to comment.