Options

How to rename constraints

joergschaberjoergschaber Vertica Customer

Hi,
is there a more simple or elegant way to rename table-contraints other than dropping and adding again?

Answers

  • Options
    marcothesanemarcothesane - Select Field - Administrator

    if there were any ways to achieve that, @joergschaber, it would be an ALTER CONSTRAINT command. I tried both searching the docu and by firing this command:

    marco ~/1/Vertica/supp $ vsql -c "ALTER CONSTRAINT l_c_pk RENAME TO pk-l_c"
    ERROR 4856:  Syntax error at or near "CONSTRAINT" at character 7
    LINE 1: ALTER CONSTRAINT l_c_pk RENAME TO pk-l_c
    

Leave a Comment

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