【发布时间】:2021-04-23 10:50:14
【问题描述】:
我想使用 shell 脚本运行下面的代码。
psql -U postgres -d webstore -c "update business set subscription='{"nextSubscriptionPlan": null, "currentPlanEndDateTime": 1893456000000, "nextPlanSubscriptionId": null, "currentSubscriptionPlan": "Demo", "currentPlanSubscriptionId": null, "nextPlanActivationDateTime": null, "currentPlanActivatedDateTime": 1587050358298}' where businessid='buz_0000001'"
但我得到的回应不足。
FATAL: invalid input syntax for type json
LINE 1: update business set subscription='{nextSubscriptionPl...
^
DETAIL: Token "nextSubscriptionPlan" is invalid.
CONTEXT: JSON data, line 1: {nextSubscriptionPlan...
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost
【问题讨论】: