Skip to content

[FORMATTING] Unusual formatting of RETURNING clause, part 2 #870

@bconway

Description

@bconway

Input data

Which SQL and options did you provide as input?

From the PostgreSQL 17 UPDATE doc samples:

UPDATE weather SET temp_lo = temp_lo+1, temp_hi = temp_lo+15, prcp = DEFAULT
  WHERE city = 'San Francisco' AND date = '2003-07-03'
  RETURNING temp_lo, temp_hi, prcp;

Expected Output

UPDATE weather
SET
  temp_lo = temp_lo + 1,
  temp_hi = temp_lo + 15,
  prcp = DEFAULT
WHERE
  city = 'San Francisco'
  AND date = '2003-07-03'
RETURNING
  temp_lo,
  temp_hi,
  prcp

Actual Output

UPDATE weather
SET
  temp_lo = temp_lo + 1,
  temp_hi = temp_lo + 15,
  prcp = DEFAULT
WHERE
  city = 'San Francisco'
  AND date = '2003-07-03' RETURNING temp_lo,
  temp_hi,
  prcp

Usage

Previous bug here: #678

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions