pgsodium icon indicating copy to clipboard operation
pgsodium copied to clipboard

TCE: triggers recreated twice per column

Open michelp opened this issue 3 years ago • 1 comments

Triggers get recreated twice per column due to loose masking view query.

michelp avatar Dec 14 '22 00:12 michelp

Hi,

Speaking about tha,t I don't understand why create_mask_view() is called for each encrypted columns in a table considering that:

  • it drops the related decrypted_<relname> view
  • it creates the related decrypted_<relname> view with the code to decrypted all columns
  • it actually creates all trigger functions and triggers for all encrypted columns on a table.

This function obviously handle the full table and encryted fields, recreating the view and triggers, so why should it be called for each encrypted field?

ioguix avatar Dec 15 '22 15:12 ioguix