Skip to content

Commit a00a493

Browse files
committed
Update test runner for pg 16 and add pgsodium.seclabel view easily see labled columns.
1 parent dc411ab commit a00a493

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
55
# install base dependences
66
RUN apt-get update && \
77
apt-get install -y make cmake git curl build-essential m4 sudo gdbserver \
8-
gdb libreadline-dev bison flex zlib1g-dev tmux zile zip vim gawk wget
8+
gdb libreadline-dev bison flex zlib1g-dev tmux zile zip vim gawk wget libicu-dev pkg-config
99

1010
# add postgres user and make data dir
1111
RUN groupadd -r postgres && useradd --no-log-init -r -m -s /bin/bash -g postgres -G sudo postgres

sql/pgsodium--3.1.8--3.1.9.sql

+11
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,14 @@ $$
125125
LANGUAGE plpgsql
126126
SET search_path=''
127127
;
128+
129+
CREATE VIEW pgsodium.seclabel AS
130+
SELECT nspname, relname, attname, label
131+
FROM pg_seclabel sl,
132+
pg_class c,
133+
pg_attribute a,
134+
pg_namespace n
135+
WHERE sl.objoid = c.oid
136+
AND c.oid = a.attrelid
137+
AND a.attnum = sl.objsubid
138+
AND n.oid = c.relnamespace;

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

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

77
for version in $versions
88
do

test/pgsodium_schema.sql

+4-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ SELECT bag_eq($$
175175
('view pgsodium.decrypted_key' ::text),
176176
('view pgsodium.mask_columns' ::text),
177177
('view pgsodium.masking_rule' ::text),
178-
('view pgsodium.valid_key' ::text)
178+
('view pgsodium.valid_key' ::text),
179+
('view pgsodium.seclabel' ::text)
179180
$$,
180181
'Check extension object list');
181182

@@ -460,7 +461,8 @@ SELECT views_are('pgsodium', ARRAY[
460461
'decrypted_key',
461462
'mask_columns',
462463
'masking_rule',
463-
'valid_key'
464+
'valid_key',
465+
'seclabel'
464466
]);
465467

466468
---- VIEW decrypted_key

0 commit comments

Comments
 (0)