pgAdmin 4 v3自动缩进不起作用

时间:2018-07-31 11:40:19

标签: windows auto-indent pgadmin-4

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

我尝试过Chrome和Edge都没有区别。我更改了选项卡大小和使用空间选项,但没有任何运气。我正在使用Windows 10 Pro。

还有其他人遇到这个问题吗?

2 个答案:

答案 0 :(得分:2)

更新!!!


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

谢谢pgAdmin团队!

注意:pgAdmin 4版本4.2仍然存在此问题        更新时间:2109年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进行测试。在分号后按Enter。',13));

* /

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

x:= substr('取消注释以对此进行测试。在分号后按回车键。',13);

x:= upper(x);

答案 1 :(得分:0)

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

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

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

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