Project

General

Profile

« Previous | Next » 

Revision 14195

schemas/util.sql: added col_add()

View differences:

trunk/schemas/util.sql
1149 1149

  
1150 1150

  
1151 1151
--
1152
-- Name: col_add(col_def); Type: FUNCTION; Schema: util; Owner: -
1153
--
1154

  
1155
CREATE FUNCTION col_add(col_def col_def) RETURNS void
1156
    LANGUAGE sql
1157
    AS $_$
1158
SELECT util.create_if_not_exists($$ALTER TABLE $$||(col_def).col.table_
1159
||$$ ADD COLUMN $$||quote_ident((col_def).col.name)||$$ $$||col_def.type)
1160
$_$;
1161

  
1162

  
1163
--
1152 1164
-- Name: col_comment(col); Type: FUNCTION; Schema: util; Owner: -
1153 1165
--
1154 1166

  

Also available in: Unified diff