DROP SCHEMA IF EXISTS test_view CASCADE;
CREATE SCHEMA test_view;
SET search_path TO test_view;
CREATE VIEW "one" AS SELECT 1::int;
definition: ' SELECT 1 AS int4;'
Change view. DROP VIEW "one"; CREATE VIEW "one" AS SELECT 'one'::text;.
DROP VIEW "one"; CREATE VIEW "one" AS SELECT 'one'::text;
Execute yamltodb using yml as before yeilds
CREATE OR REPLACE VIEW test_view.one AS
SELECT 1 AS int4;
Which won't work as postgres considers it impossible to alter the type of a column in already existing view. I've been lucky so far in that just dropping the view and then recreating it has been possible every time. I expect things to get ugly when other objects depend on the view.
Pyrseas 0.7.1, postgres 9.2.6
Changes to views (as well as changes to foreign key constraints) is one of the weak spots of yamltodb currently. It should be possible to detect the problem in your test case and issue the DROP/CREATE instead, but as you point out it gets ugly when there are other dependencies. Much remains to be done in this area.