错误:无法在Heroku PostgreSQL中的只读事务中执行TRUNCATE TABLE [英] `ERROR: cannot execute TRUNCATE TABLE in a read-only transaction` in Heroku PostgreSQL
问题描述
我在Heroku PostgreSQL中得到了ERROR: cannot execute TRUNCATE TABLE in a read-only transaction
.我该如何解决?
I am getting the ERROR: cannot execute TRUNCATE TABLE in a read-only transaction
in Heroku PostgreSQL. How could I fix it?
我正在尝试TRUNCATE
一张桌子.
我正在使用Heroku Postgres
.
我试图在UI中弄清楚如何更改权限或类似的内容,不仅允许运行read-only transactions
.但是没有成功.
I have tried to figure out in the UI how I could change my permissions or something similar to be allowed to run not only the read-only transactions
. But with no success.
推荐答案
The feature you're looking at (Heroku Dataclips docs here) is intentionally made read-only. Its a reporting tool, not a database management tool. The express purpose is to allow surfacing data to a wider group of people associated with a project without the risk of someone accidentally (or otherwise) deleting or modifying data improperly. There is no way to make Dataclips read-write.
如果要完全控制删除/修改数据,则需要使用适当的界面,如果要使用GUI,则需要使用psql
或pgAdmin.
If you want full control to delete/modify data you'll need to use an appropriate interface, psql
or pgAdmin if you prefer a GUI.
这篇关于错误:无法在Heroku PostgreSQL中的只读事务中执行TRUNCATE TABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!