mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-27 00:36:59 +08:00
Department of second thoughts: further experimentation with CREATE OR REPLACE
VIEW suggests that it'd be worth spelling the error messages out in a little more detail. This seems to help with localizing the problem.
This commit is contained in:
@ -53,11 +53,11 @@ ERROR: cannot drop columns from view
|
||||
-- should fail
|
||||
CREATE OR REPLACE VIEW viewtest AS
|
||||
SELECT 1, * FROM viewtest_tbl;
|
||||
ERROR: cannot change name of view column "a"
|
||||
ERROR: cannot change name of view column "a" to "?column?"
|
||||
-- should fail
|
||||
CREATE OR REPLACE VIEW viewtest AS
|
||||
SELECT a, b::numeric FROM viewtest_tbl;
|
||||
ERROR: cannot change data type of view column "b"
|
||||
ERROR: cannot change data type of view column "b" from integer to numeric
|
||||
-- should work
|
||||
CREATE OR REPLACE VIEW viewtest AS
|
||||
SELECT a, b, 0 AS c FROM viewtest_tbl;
|
||||
|
||||
Reference in New Issue
Block a user