Monthly Archives: March 2010

Common constructs writing ]po[ update scripts

Sample Script create or replace function inline_0 () returns integer as ‘ declare v_count integer; begin select count(*) into v_count from user_tab_columns where lower(table_name) = ”acs_object_types” and lower(column_name) = ”icon_path”; IF v_count > 0 THEN return 1; END IF; alter table acs_object_types add column icon_path character varying(100); RETURN 0; end;’ language ‘plpgsql’; select inline_0 (); [...]