SQLPro icon indicating copy to clipboard operation
SQLPro copied to clipboard

Bug: Concatenate symbol || (vertical bars) is formatted incorrectly

Open jonjacs opened this issue 2 months ago • 2 comments

Describe the bug

Describe the bug When using "Format Query" it will incorrectly put a space between the vertical bars making the statement incorrect.

To Reproduce Having

select info1 || ', ' || info2 from customer

and now doing "Format Query" will end up in:

SELECT
    info1 | | ', ' | | info2
FROM
    customer

Executing the query now results in....

ERROR:  operator does not exist: | unknown
LINE 2:     info1 | | ', ' | | info2
                    ^
HINT:  No operator matches the given name and argument type. You might need to add an explicit type cast.

Expected behavior No extra space between the vertical bars should be added when formatting.

SELECT
    info1 || ', ' || info2
FROM
    customer

Screenshots

Image Image

Product

SQLPro Studio

App version

2025.76

Platform

macOS

Installation source

App Store

jonjacs avatar Dec 15 '25 12:12 jonjacs

Sorry for the delay on this one! I have reproduced and am working on the fix.

hankinsoft avatar Jan 09 '26 13:01 hankinsoft

Fixed build has been submitted to the App Store. It usually takes < 24 hours or so for the build to become available.

hankinsoft avatar Jan 09 '26 14:01 hankinsoft

@hankinsoft -- hey sir!

I'm on Version 2025.80 (Build 111156) and this still happens for me.

-- Input
SELECT 'foo' || 'bar' AS concat_test;

-- After Format Query
SELECT 'foo' | | 'bar' AS concat_test;

You can use CONCAT() as a workaround

SELECT CONCAT('foo', 'bar') AS concat_test;

But I do use the vertical bars more regularly

macOS Setapp Installation SQLPro Studio

aaaaaadrian avatar Jan 23 '26 20:01 aaaaaadrian

Submitting the Setapp fix now. It should be available within ~24 hours or so.

hankinsoft avatar Jan 26 '26 17:01 hankinsoft

Going to close as this has been available for a bit. If anyone still has any issues with it after updating to the latest version, please let me know.

hankinsoft avatar Feb 12 '26 13:02 hankinsoft