What is the maximum length of a comment in PostgreSQL? PostgreSQL has a special piece of a functionality called COMMENT which attaches metadata to an identifier or any type (schema, table, column, function, type, domain, etc). It looks like this,

COMMENT ON TABLE mytable IS 'This is my table.';


Is there a maximum size for the comment?
COMMENT has no impositions other than it fit into a TEXT field (verified in IRC with RhodiumToad),

From the docs,


  Very long values are also stored in background tables so that they do not interfere with rapid access to shorter column values. In any case, the longest possible character string that can be stored is about 1 GB.


So if you're under a GB or thereabout, you're probably fine.