Revision 12658
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
3715 | 3715 |
LANGUAGE plpgsql STRICT |
3716 | 3716 |
AS $$ |
3717 | 3717 |
BEGIN |
3718 |
PERFORM util.eval(sql);
|
|
3718 |
PERFORM util.eval(sql);
|
|
3719 | 3719 |
EXCEPTION |
3720 |
WHEN wrong_object_type THEN NULL; -- trying to alter a view's columns |
|
3721 |
WHEN undefined_column THEN NULL; |
|
3722 |
WHEN duplicate_column THEN NULL; |
|
3720 |
/* trying to add NOT NULL column to parent table, which cascades to child |
|
3721 |
table whose values for the new column will be NULL */ |
|
3722 |
WHEN not_null_violation THEN NULL; |
|
3723 |
WHEN wrong_object_type THEN NULL; -- trying to alter a view's columns |
|
3724 |
WHEN undefined_column THEN NULL; |
|
3725 |
WHEN duplicate_column THEN NULL; |
|
3723 | 3726 |
END; |
3724 | 3727 |
$$; |
3725 | 3728 |
|
Also available in: Unified diff
schemas/util.sql: try_create(): also handle not_null_violation, which is thrown when trying to add a NOT NULL column to a parent table, which cascades to a child table whose values for the new column will be NULL