diff --git a/Makefile.in b/Makefile.in index e3a32a3a..eb166667 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ toast_extended_storage \ move_large_tuples \ non_sorted_off_compact \ update_compare_indexes \ -pgtde_is_encrypted \ +pg_tde_is_encrypted \ test_issue_153_fix \ multi_insert \ trigger_on_view \ diff --git a/README.md b/README.md index c64d27da..bbb5063e 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ docker build . -f ./docker/Dockerfile -t your-image-name The extension provides the following helper functions: -### pgtde_is_encrypted(tablename) +### pg_tde_is_encrypted(tablename) Returns `t` if the table is encrypted (uses the pg_tde access method), or `f` otherwise. diff --git a/expected/change_access_method.out b/expected/change_access_method.out index d08f1bf7..f8ea497e 100644 --- a/expected/change_access_method.out +++ b/expected/change_access_method.out @@ -29,9 +29,9 @@ SELECT * FROM country_table; 3 | USA | North America (3 rows) -SELECT pgtde_is_encrypted('country_table'); - pgtde_is_encrypted --------------------- +SELECT pg_tde_is_encrypted('country_table'); + pg_tde_is_encrypted +--------------------- t (1 row) @@ -53,9 +53,9 @@ SELECT * FROM country_table; 6 | Canada | North America (6 rows) -SELECT pgtde_is_encrypted('country_table'); - pgtde_is_encrypted --------------------- +SELECT pg_tde_is_encrypted('country_table'); + pg_tde_is_encrypted +--------------------- f (1 row) @@ -79,9 +79,9 @@ SELECT * FROM country_table; 9 | Australia | Oceania (9 rows) -SELECT pgtde_is_encrypted('country_table'); - pgtde_is_encrypted --------------------- +SELECT pg_tde_is_encrypted('country_table'); + pg_tde_is_encrypted +--------------------- t (1 row) diff --git a/expected/pgtde_is_encrypted.out b/expected/pg_tde_is_encrypted.out similarity index 89% rename from expected/pgtde_is_encrypted.out rename to expected/pg_tde_is_encrypted.out index 37726b99..e7f5774d 100644 --- a/expected/pgtde_is_encrypted.out +++ b/expected/pg_tde_is_encrypted.out @@ -36,15 +36,15 @@ SELECT amname FROM pg_class INNER JOIN pg_am ON pg_am.oid = pg_class.relam WHERE heap (1 row) -SELECT pgtde_is_encrypted('test_enc'); - pgtde_is_encrypted --------------------- +SELECT pg_tde_is_encrypted('test_enc'); + pg_tde_is_encrypted +--------------------- t (1 row) -SELECT pgtde_is_encrypted('test_norm'); - pgtde_is_encrypted --------------------- +SELECT pg_tde_is_encrypted('test_norm'); + pg_tde_is_encrypted +--------------------- f (1 row) diff --git a/meson.build b/meson.build index 98b43425..82410bb0 100644 --- a/meson.build +++ b/meson.build @@ -89,7 +89,7 @@ tests += { 'move_large_tuples', 'non_sorted_off_compact', 'update_compare_indexes', - 'pgtde_is_encrypted', + 'pg_tde_is_encrypted', 'test_issue_153_fix', 'multi_insert', 'keyprovider_dependency', diff --git a/pg_tde--1.0.sql b/pg_tde--1.0.sql index ae4ca39a..9490e5bf 100644 --- a/pg_tde--1.0.sql +++ b/pg_tde--1.0.sql @@ -62,7 +62,7 @@ RETURNS table_am_handler AS 'MODULE_PATHNAME' LANGUAGE C; -CREATE FUNCTION pgtde_is_encrypted(table_name VARCHAR) +CREATE FUNCTION pg_tde_is_encrypted(table_name VARCHAR) RETURNS boolean AS $$ SELECT EXISTS ( diff --git a/sql/change_access_method.sql b/sql/change_access_method.sql index bdcf0d11..f489befd 100644 --- a/sql/change_access_method.sql +++ b/sql/change_access_method.sql @@ -16,7 +16,7 @@ SELECT pg_tde_set_principal_key('test-db-principal-key','file-vault'); SELECT * FROM country_table; -SELECT pgtde_is_encrypted('country_table'); +SELECT pg_tde_is_encrypted('country_table'); -- Try changing the encrypted table to an unencrypted table ALTER TABLE country_table SET access method heap; @@ -27,7 +27,7 @@ INSERT INTO country_table (country_name, continent) ('Canada', 'North America'); SELECT * FROM country_table; -SELECT pgtde_is_encrypted('country_table'); +SELECT pg_tde_is_encrypted('country_table'); -- Change it back to encrypted ALTER TABLE country_table SET access method pg_tde_basic; @@ -37,7 +37,7 @@ INSERT INTO country_table (country_name, continent) ('Brazil', 'South America'), ('Australia', 'Oceania'); SELECT * FROM country_table; -SELECT pgtde_is_encrypted('country_table'); +SELECT pg_tde_is_encrypted('country_table'); DROP TABLE country_table; DROP EXTENSION pg_tde; diff --git a/sql/pgtde_is_encrypted.sql b/sql/pg_tde_is_encrypted.sql similarity index 91% rename from sql/pgtde_is_encrypted.sql rename to sql/pg_tde_is_encrypted.sql index d4a30385..d31872ed 100644 --- a/sql/pgtde_is_encrypted.sql +++ b/sql/pg_tde_is_encrypted.sql @@ -20,8 +20,8 @@ CREATE TABLE test_norm( SELECT amname FROM pg_class INNER JOIN pg_am ON pg_am.oid = pg_class.relam WHERE relname = 'test_enc'; SELECT amname FROM pg_class INNER JOIN pg_am ON pg_am.oid = pg_class.relam WHERE relname = 'test_norm'; -SELECT pgtde_is_encrypted('test_enc'); -SELECT pgtde_is_encrypted('test_norm'); +SELECT pg_tde_is_encrypted('test_enc'); +SELECT pg_tde_is_encrypted('test_norm'); SELECT key_provider_id, key_provider_name, principal_key_name FROM pg_tde_principal_key_info();