You have to ensure the quotes end up in the gsql shell.
ssh -p29418 <host> gerrit gsql -c '"select * from accounts;"'
(first single quote ' , then double quote " )
gerrit gsql -c "\"select * from ACCOUNT_GROUP_NAMES where name='Reviewer_simulator'\""
http://repo-discuss.narkive.com/j6WKLysJ/how-can-i-use-gerrit-gsql-c-option
本文介绍如何正确使用gerrit gsql-c命令来执行SQL查询,包括通过SSH连接到特定主机并执行复杂SQL语句的方法。示例展示了如何从accounts表中选择所有记录,以及如何查询特定名称的ACCOUNT_GROUP_NAMES。
7448

被折叠的 条评论
为什么被折叠?



