hasura/graphql-engine

attempting to add a default value to a column used by a view results in an error

オープン

#3,224 opened on 2019/10/24

 (3 件のコメント) (0 件のリアクション) (1 人の担当者)TypeScript (2,787 件のフォーク)batch import
a/data/postgresc/consolee/easyhelp wantedk/bugp/high

Repository metrics

Stars
 (31,371 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Via the console, attempting to add a default value to a column which is used by a postgres view results in the following error:

Modifying Column Failed:
postgres-error: cannot alter type of a column used by a view or rule

Note, we are not changing the column type, we are simply adding a default value. Performing the same operation directly on the database works as expected.

i.e.

alter table "UserProfilePermissions" alter column "emailAddresses" set default 'false';

コントリビューターガイド