0
回答
psql 返回值的问题
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
[root @test DBUpgrade]# /opt/postgres/current/bin/psql -Utest -dtestdb -f v1_6.sql
ERROR:  table "test_b" does not exist
STATEMENT:  drop table test_b;
psql.bin:v1_6.sql:1: ERROR:  table "test_b" does not exist
ERROR:  cannot drop table dashboard_pane because other objects depend on it
DETAIL:  constraint fk_userpane_panes on table user_panes depends on table dashboard_pane
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
STATEMENT:  drop table dashboard_pane;
psql.bin:v1_6.sql:2: ERROR:  cannot drop table dashboard_pane because other objects depend on it
DETAIL:  constraint fk_userpane_panes on table user_panes depends on table dashboard_pane
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
[root @test DBUpgrade]# echo $?
0

很明显psql执行失败了,为什么返回值还是0?
举报
zsmszsms
发帖于5年前 0回/248阅
顶部