man*_*ore 3 postgresql heroku heroku-postgres
我在 Heroku PostgreSQL 中得到了ERROR: cannot execute TRUNCATE TABLE in a read-only transaction。我该如何解决它?
我正在尝试TRUNCATE一张桌子。
我正在使用Heroku Postgres.
我试图在用户界面中弄清楚如何更改我的权限或类似的东西以允许不仅运行read-only transactions. 但没有成功。
目前这是可能的,您必须在创建数据剪辑时将事务设置为“READ WRITE”。这是一个例子:
begin;
set transaction read write;
Delete FROM mytable where id > 2130;
COMMIT;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4542 次 |
| 最近记录: |