How does one add comments on columns so that they appear through the odbc_columns table and through

Comments

  • Hi! Are you looking for this feature: https://my.vertica.com/docs/6.1.x/HTML/index.htm#15926.htm
    COMMENT ON COLUMN Adds, revises, or removes a projection column comment. You can only add comments to projection columns, not to table columns. Each object can have a maximum of 1 comment (1 or 0). Comments are stored in the V_CATALOG.COMMENTS system table. Syntax COMMENT ON COLUMN [[db-name.]schema.]proj_name.column_name IS {'comment' | NULL}
  • I am looking for something like it. As the detail says, you can only add comments to columns in projections, not tables. I tried adding comments to projections, but did not see these comments propagated through to the odbc_columns remarks field. It appears as if browsers, like dbvis, are looking to this table to summarize table/view columns. Since this is commonly how some users view the data (through an odbc or jdbc connection), a simple remark would be a useful way to communicate something about a column. Since I can't tell where in the table/projection creation process the obdc_columns table is populated or if it is a view, which projections it is using to gather the column information, is there a way to populate comments on the projection columns so that it flows through to the odbc_columns table? Thanks for the help,
  • Raul,
    I think this is the same page that Daniel pointed to above.   The documentation states that this is for projections, not "tables".  Since something like a view is being queried for the information on a "table" through an odbc or jdbc based query browser (like dbvis), is there a way to let the comment on a column pass through the odbc interface to the query browser?   For example, there may be multiple projections (buddies, super, etc) for a given "table" object.   When an informational query about a "table" (such as the list of columns, column data-types, etc.) comes from a query browser, where does the odbc interface get the column labels from?  Does it come from a default super-projection?  What if there is no super-projection?
    Thanks,
    Christian

Leave a Comment

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