How to do version upgrade when tables has dependency on custom UDx

Hi,

I had few flex tables disappear after version upgrade.

After quite a lot of digging, it was traced to custom UDx library upgrade.

Users had flex tables that materialised column based on function from custom UDx library.
Those tables had dependency on custom UDx library.
On version upgrade, I had to recreate UDx library, linked with new version of UDx API.
I am issuing "drop library cascade", and it drops all tables that dependent on it.

I am a little bit lost, how I can do version upgrade, while keeping flex tables in place, and upgrading custom UDx library?

Version upgrade require custom UDx library upgrade, to use new UDx API. Library upgrade require "drop library cascade". Drop library drop all functions from library. That will drop dependent flex tables that uses functions.

How to keep flex tables from being dropped?

Your help is always appreciated.
Thank you
Sergey

Best Answer

  • Ariel_CaryAriel_Cary Vertica Employee Employee
    Answer ✓
    Version upgrade require custom UDx library upgrade, to use new UDx API. Library upgrade require "drop library cascade".

    To upgrade a UDx library, you do not need to drop the library first. Instead, use the REPLACE option to swap the implementation with the new library file, as in CREATE OR REPLACE my_library AS <library_file>. Any UDx function depending on the replaced library will automatically use the new definition.

    https://docs.vertica.com/12.0.x/en/sql-reference/statements/create-statements/create-library/

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file