COMMENT ON TRANSFORM FUNCTION

Adds, revises, or removes a comment on a user-defined transform function. Each object can have one comment. Comments are stored in the system table COMMENTS.

Syntax

COMMENT ON TRANSFORM FUNCTION [schema.]tfunction-name 
...( [ tfunction-arg-name tfunction-arg-type ][,...] ) IS {'comment' | NULL}

Parameters

schema

Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example:

myschema.thisDbObject
tfunction-name

Specifies name of the transform function with which to associate the comment.

tfunction-arg-name 
tfunction-arg-type

Indicates the names and data types of one or more transform function arguments. If you supply argument names and types, each type must match the type specified in the library used to create the original transform function.

comment

Specifies the comment text to add. If a comment already exists for this transform function, this comment overwrites the previous one.

Comments can be up to 8192 characters in length. If a comment exceeds that limitation, Vertica truncates the comment and alerts the user with a message.

Enclose a blank value within single quotes to remove an existing comment.

NULL

Removes an existing comment.

Privileges

Examples

The following example adds a comment to the macros.zerowhennull (x INT) UTF function:

=> COMMENT ON TRANSFORM FUNCTION macros.zerowhennull(x INT) IS 'Returns a 0 if not NULL';

The following example removes a comment from the acros.zerowhennull (x INT) function by using the NULL option:

=> COMMENT ON TRANSFORM FUNCTION macros.zerowhennull(x INT) IS NULL;