Skip to content

Improve SELECT/PERFORM/RETURN formatting - #86

Merged
nene merged 3 commits into
nene:masterfrom
joelmukuthu:fix/select-and-return-formatting
Oct 9, 2026
Merged

nene merged 3 commits into
nene:masterfrom
joelmukuthu:fix/select-and-return-formatting

Conversation

@joelmukuthu

Copy link
Copy Markdown
Contributor

Closes:

@joelmukuthu
joelmukuthu force-pushed the fix/select-and-return-formatting branch from 4ba2c0c to 67bffd6 Compare September 30, 2026 12:30

@nene nene left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This looks good.

Sorry, for the delayed response. My life has been really busy lately.

Comment on lines +307 to +324
it(`keeps single-column PERFORM with nested breaks on one line when it fits`, async () => {
expect(
await pretty(
dedent`
PERFORM some_function_name(
arg => 1
)
`,
{ dialect: "plpgsql" },
),
).toBe(dedent`
PERFORM some_function_name(arg => 1)
`);
});

it(`breaks inside single-column function args without hanging PERFORM`, async () => {
await testPlpgsql(dedent`
PERFORM some_function_name(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These separate tests for PERFORM are quite unnecessary. Because PERFORM is essentially just a different keyword with which a SELECT-statement can start.

Really this single small test above these to check that PERFORM can be used instead of SELECT is quite enough.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped these by myself.

nene added a commit that referenced this pull request Oct 9, 2026
@nene
nene merged commit 67bffd6 into nene:master Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants