Project

General

Profile

« Previous | Next » 

Revision 13479

bugfix: schemas/util.sql: mk_set_comment(): need to handle NULL comment properly

View differences:

trunk/schemas/util.sql
2546 2546
CREATE FUNCTION mk_set_comment(table_ regclass, comment text) RETURNS text
2547 2547
    LANGUAGE sql STABLE
2548 2548
    AS $_$
2549
SELECT $$COMMENT ON TABLE $$||$1||$$ IS $$||quote_nullable($2)
2549
SELECT COALESCE($$COMMENT ON TABLE $$||$1||$$ IS $$
2550
||quote_literal($2)/*pass NULL through*/, ''/*no comment*/)
2550 2551
$_$;
2551 2552

  
2552 2553

  

Also available in: Unified diff