Take this code:
CREATE TABLE list_tag(
list_id VARCHAR(36),
name VARCHAR(25)
);
If I duplicate this line in Datagrip I get this:
CREATE TABLE list_tag(
list_id VARCHAR(36),
name VARCHAR(25)
);
Suddenly 4 spaces turn into 27. Same issue occurs if i have an empty CREATE TABLE and try pasting something in there. I checked my spacing options for sql and postgres, they’re just 4 spaces.
Curiously, newlining the opening brace, done like this does work
CREATE TABLE user_list
(
list_id VARCHAR(36),
username VARCHAR(25)
);
However, that’s just not my personal preference, so I don’t know if there’s a solution to this or if it’s just forced into datagrip.