Updated on 2023-12-22 GMT+08:00

GAUSS-00551 -- GAUSS-00560

GAUSS-00551: "could not determine which collation to use for view column '%s'"

SQLSTATE: 42P22

Description: The collation to be used by a view column cannot be determined.

Solution: Use the COLLATE clause to assign a collation to the column.

Example:

1
2
3
postgres=# create view v1 as select t1.a || t2.a from t1,t2;
ERROR:  could not determine which collation to use for view column "?column?"
HINT:  Use the COLLATE clause to set the collation explicitly.

GAUSS-00552: "view must have at least one column"

SQLSTATE: 42P16

Description: The number of columns defining a view is smaller than 1.

Solution: Ensure that the number of columns defining a view is greater than or equal to 1.

GAUSS-00553: "'%s' is not a view"

SQLSTATE: 42809

Description: The object is not a view.

Solution: Ensure the object is a view.

GAUSS-00554: "cannot drop columns from view"

SQLSTATE: 42P16

Description: Columns cannot be deleted from a defined view.

Solution: Delete columns from an undefined view.

GAUSS-00555: "cannot change name of view column '%s' to '%s'"

SQLSTATE: 42P16

Description: Columns of a defined view cannot be modified.

Solution: Modify columns of an undefined view.

GAUSS-00556: "cannot change data type of view column '%s' from %s to %s"

SQLSTATE: 42P16

Description: When CREATE OR REPLACE VIEW is used to define a view, the new view and the original view do not have the same column data type.

Solution: Ensure that the new view and the original view have the same column data type.

GAUSS-00557: "unexpected parse analysis result"

SQLSTATE: XX000

Description: Internal system error.

Solution: Contact technical support.

GAUSS-00558: "views must not contain SELECT INTO"

SQLSTATE: 0A000

Description: Statements used to define a view contain the SELECT INTO statement.

Solution: Ensure that a single SELECT statement is executed to query the results.

GAUSS-00559: "views must not contain data-modifying statements in WITH"

SQLSTATE: 0A000

Description: Statements used to define a view contain the WITH clause.

Solution: Ensure that a single SELECT statement is executed to query the results.

GAUSS-00560: "CREATE VIEW specifies more column names than columns"

SQLSTATE: 42601

Description: The number of columns defining a view is greater than that of columns in the returned results.

Solution: Ensure that the number of columns defining a view is not greater than that of columns in the returned results.