ページの先頭行へ戻る
Symfoware Analytics ServerV12.3.1 リファレンス
FUJITSU Software

5.3 pgxa_alter_confidential_policy

機能

秘匿化ポリシーを変更します。

書式

変更内容によって書式が異なります。書式は以下のとおりです。

共通の書式
common_arg:
[schema_name	:= 'schema_name',]
table_name	:= 'table_name',
policy_name 	:= 'policy_name'

秘匿化ポリシーに秘匿化対象を追加
pgxa_alter_confidential_policy(
common_arg,
[action := 'ADD_COLUMN', ] column_name := 'column_name' [, function_type := 'FULL'] | [, function_type := 'PARTIAL', partial_opt] | [, function_type := 'REGEXP', regexp_opt] )
partial_opt:
function_parameters	:= 'function_parameters'
regexp_opt:
regexp_pattern		:= 'regexp_pattern',
regexp_replacement		:= 'regexp_replacement',
[, regexp_flags		:= 'regexp_flags']

秘匿化ポリシーから秘匿化対象を削除
pgxa_alter_confidential_policy(
common_arg,
action		:= 'DROP_COLUMN',
column_name	:= 'column_name'
)

秘匿化条件を変更
pgxa_alter_confidential_policy(
common_arg,
action		:= ' MODIFY_EXPRESSION',
expression	:= 'expression'
)

秘匿化対象に設定されている秘匿化ポリシーの内容を変更
pgxa_alter_confidential_policy(
common_arg,
action := 'MODIFY_COLUMN', column_name := 'column_name' [, function_type := 'FULL'] | [, function_type := 'PARTIAL', partial_opt] | [, function_type := 'REGEXP', regexp_opt] )
partial_opt:
function_parameters	:= 'function_parameters'
regexp_opt:
regexp_pattern		:= 'regexp_pattern',
regexp_replacement		:= 'regexp_replacement',
[, regexp_flags		:= 'regexp_flags']

秘匿化ポリシーの説明を変更
pgxa_alter_confidential_policy(
common_arg,
action		:= 'SET_POLICY_DESCRIPTION',
policy_description	:= 'policy_description'
)

秘匿化対象の説明を変更
pgxa_alter_confidential_policy(
common_arg,
action		:= 'SET_COLUMN_DESCRIPTION',
column_name	:= 'column_name',
column_description	:= 'column_description'
)

引数

変更内容によって引数が異なります。詳細は以下のとおりです。

引数の省略可否は以下のとおりです。

引数

省略可否

ADD_COLUMN

DROP_COLUMN

MODIFY_EXPRESSION

MODIFY_COLUMN

SET_POLICY_DESCRIPTION

SET_COLUMN_DESCRIPTION

全秘匿化

部分秘匿化

正規表現秘匿化

全秘匿化

部分秘匿化

正規表現秘匿化

schema_name

table_name

×

×

×

×

×

×

×

×

×

×

policy_name

×

×

×

×

×

×

×

×

×

×

action

×

×

×

×

×

×

×

column_name

×

×

×

×

-

×

×

×

-

×

function_type

×

×

-

-

×

×

-

-

expression

-

-

-

-

×

-

-

-

-

-

policy_description

-

-

-

-

-

-

-

-

×

-

column_description

-

-

-

-

-

-

-

-

-

×

function_parameters

-

×

-

-

-

-

×

-

-

-

regexp_pattern

-

-

×

-

-

-

-

×

-

-

regexp_replacement

-

-

×

-

-

-

-

×

-

-

regexp_flags

-

-

-

-

-

-

-

-

○:省略可  ×:省略不可  -:指定した場合は無視されます

戻り値

戻り値

意味

TRUE

正常終了

FALSE

異常終了

実行例1

秘匿化ポリシーp1に秘匿化対象c2を追加する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'ADD_COLUMN', column_name := 'c2', function_type := 'PARTIAL', function_parameters := 'VVVFVVVVFVVVV, VVV-VVVV-VVVV, *, 4, 11');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

実行例2

秘匿化ポリシーp1から秘匿化対象c1を削除する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'DROP_COLUMN', column_name := 'c1');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

実行例3

秘匿化ポリシーp1に対し、秘匿化条件を変更する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'MODIFY_EXPRESSION', expression := 'false');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

実行例4

秘匿化対象c2に設定されている秘匿化ポリシーp1の内容を変更する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'MODIFY_COLUMN', column_name := 'c2', function_type := 'FULL');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

実行例5

秘匿化ポリシーp1の説明を変更する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'SET_POLICY_DESCRIPTION', policy_description := 'this policy is an example.');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

実行例6

秘匿化対象c2の説明を変更する場合

> psql postgres
psql (x.y.z)
Type "help" for help.

postgres=# select pgxa_alter_confidential_policy(table_name := 't1', policy_name := 'p1', action := 'SET_COLUMN_DESCRIPTION', column_name := 'c2', column_description := 'c2 column is FULL.');
 pgxa_alter_confidential_policy 
--------------------------------
 t
(1 row)

x.y.z : PostgreSQLのバージョンが表示されます。

説明

参照

  • 引数に指定する文字列は、“PostgreSQL文書”の“文字列定数”を参照してください。

  • regexp_pattern、regexp_replacement、regexp_flagsに指定できる値は、“PostgreSQL文書”の“POSIX正規表現”のpattern、replacement、flagsを参照してください。