Column comment on late binding view ("NO SCHEMA BINDING") not possible

0

For our database documentation we would like to add comments to columns in different views. Most of those views are currently late-binding views.

Example for a late binding view:

CREATE OR REPLACE VIEW schema.view
AS
SELECT table."Col1", table."Col2"
FROM schema.table
WITH NO SCHEMA BINDING;

When trying to add a column comment to a late binding view by

COMMENT ON COLUMN schema.view."Col1" IS 'Some useful information';

we get the following error message: "Column "Col1" of relation "table" does not exist;"

Any advice on how to add comments on late binding views?

Thank you!

asked a year ago345 views
1 Answer
0

Are quotation marks necessary?
I felt it would work in the following way.

COMMENT ON COLUMN schema.view.Col1 IS 'Some useful information';
profile picture
EXPERT
answered a year ago
  • Thank you for your answer!

    The quotation marks are not strictly necessary. Only in the case of case sensitive data it's relevant. Leaving them away does not change the behavior unfortunately...

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions