Revision 13938
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
2870 | 2870 |
CREATE FUNCTION mk_set_comment(table_ regclass, comment text) RETURNS text |
2871 | 2871 |
LANGUAGE sql STABLE |
2872 | 2872 |
AS $_$ |
2873 |
SELECT COALESCE($$COMMENT ON $$||util.relation_type($1)||$$ $$||$1||$$ IS $$ |
|
2874 |
||quote_literal($2)/*pass NULL through*/||$$;$$, ''/*no comment*/) |
|
2873 |
SELECT util.mk_set_comment(util.relation_type($1)||' '||$1, $2) |
|
2875 | 2874 |
$_$; |
2876 | 2875 |
|
2877 | 2876 |
|
Also available in: Unified diff
schemas/util.sql: mk_set_comment(table_ regclass, comment text): use new util.mk_set_comment(text, text)