Skip to content

Commit

Permalink
Update test runner for pg 16 and add pgsodium.seclabel view easily se…
Browse files Browse the repository at this point in the history
…e labled columns.
  • Loading branch information
michelp committed Sep 20, 2023
1 parent dc411ab commit a00a493
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
# install base dependences
RUN apt-get update && \
apt-get install -y make cmake git curl build-essential m4 sudo gdbserver \
gdb libreadline-dev bison flex zlib1g-dev tmux zile zip vim gawk wget
gdb libreadline-dev bison flex zlib1g-dev tmux zile zip vim gawk wget libicu-dev pkg-config

# add postgres user and make data dir
RUN groupadd -r postgres && useradd --no-log-init -r -m -s /bin/bash -g postgres -G sudo postgres
Expand Down
11 changes: 11 additions & 0 deletions sql/pgsodium--3.1.8--3.1.9.sql
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,14 @@ $$
LANGUAGE plpgsql
SET search_path=''
;

CREATE VIEW pgsodium.seclabel AS
SELECT nspname, relname, attname, label
FROM pg_seclabel sl,
pg_class c,
pg_attribute a,
pg_namespace n
WHERE sl.objoid = c.oid
AND c.oid = a.attrelid
AND a.attnum = sl.objsubid
AND n.oid = c.relnamespace;
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

versions=${1:-13 14 15}
versions=${1:-13 14 15 16}

for version in $versions
do
Expand Down
6 changes: 4 additions & 2 deletions test/pgsodium_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ SELECT bag_eq($$
('view pgsodium.decrypted_key' ::text),
('view pgsodium.mask_columns' ::text),
('view pgsodium.masking_rule' ::text),
('view pgsodium.valid_key' ::text)
('view pgsodium.valid_key' ::text),
('view pgsodium.seclabel' ::text)
$$,
'Check extension object list');

Expand Down Expand Up @@ -460,7 +461,8 @@ SELECT views_are('pgsodium', ARRAY[
'decrypted_key',
'mask_columns',
'masking_rule',
'valid_key'
'valid_key',
'seclabel'
]);

---- VIEW decrypted_key
Expand Down

0 comments on commit a00a493

Please sign in to comment.