The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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

  • 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