pgAdmin 4 v3自动缩进不起作用

问题描述 投票:2回答:2

自升级到4.3以来,“自动缩进”不起作用(在“查询工具”选项卡中工作)。当在一行代码的末尾按Enter键时,光标出现在下一行的随机位置(有时在末尾),而不是在正确的缩进位置。这非常令人沮丧,因为我必须在行的开头单击并为每个新行正确缩进。

我尝试过Chrome和Edge没有区别。我没有任何运气改变了选项卡大小和使用空格选项。我使用的是Windows 10 Pro。

其他人有这个问题吗?

windows auto-indent pgadmin-4
2个回答
2
投票

UPDATE!


此问题已在pgAdmin 4版本4.3中修复!

谢谢pgAdmin团队!

注意:这仍然是pgAdmin 4版本4.2的问题更新:2009年2月19日:(

/* 问题:

(Tested on Windows Server 2012 R2, Chrome and Firefox, pgAdmin 4 3.2)

Using nested functions in a variable assignment, or just in a SQL statement 
causes multiple tabs to be added when hitting enter for a new line anywhere 
later in your code. 

If you uncomment the first line with nested functions (below), all
carriage returns lower in the code create new lines with
many unwanted tabs. 

Uncomment the line below and hit enter at the end of the line, 
or before another line of code.

*/

/*

x:= upper(substr('uncomment to test this。在分号后输入。',13));

*/

/ *我的解决方法是取消函数并使用多个语句。注意:请确保上面的违规行已注释掉。 * /

x:= substr('取消对此进行测试。在分号后点击输入。',13);

x:= upper(x);


0
投票

尝试了你的建议,它确实有效。但是,我们必须注释掉整个违规行(即使用嵌套文本)才能完成这项工作,这似乎很奇怪。我没有遇到其他编辑的这个问题。例如,在SQL Developer中输入相同的文本,如下所示:

SELECT *
FROM employees
WHERE deptno IN (SELECT deptno FROM departments
                 WHERE loc = 'CHICAGO');

按Enter键将光标置于第二个WHERE(与Postgres相同)下。我用Shift + Tab清除选项卡到第1列,然后继续我很好。每个新行,光标都在开头。这不适用于Postgres。

我还是很多新手。谢谢你的分享。

© www.soinside.com 2019 - 2024. All rights reserved.