Revision 13935
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
2841 | 2841 |
|
2842 | 2842 |
|
2843 | 2843 |
-- |
2844 |
-- Name: mk_set_comment(text, text); Type: FUNCTION; Schema: util; Owner: - |
|
2845 |
-- |
|
2846 |
|
|
2847 |
CREATE FUNCTION mk_set_comment(on_ text, comment text) RETURNS text |
|
2848 |
LANGUAGE sql STABLE |
|
2849 |
AS $_$ |
|
2850 |
SELECT COALESCE($$COMMENT ON $$||$1||$$ IS $$ |
|
2851 |
||quote_literal($2)/*pass NULL through*/||$$;$$, ''/*no comment*/) |
|
2852 |
$_$; |
|
2853 |
|
|
2854 |
|
|
2855 |
-- |
|
2844 | 2856 |
-- Name: mk_set_comment(regclass, text); Type: FUNCTION; Schema: util; Owner: - |
2845 | 2857 |
-- |
2846 | 2858 |
|
Also available in: Unified diff
schemas/util.sql: added mk_set_comment(on_ text, comment text)