bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

Postgres 15 strictness #375

Closed parsonsmatt closed 10 months ago

parsonsmatt commented 10 months ago

I'm running into an error where I do, basically,

select do
  t <- from table
  limit 1
  forUpdateOf t skipLocked
  pure t

The generated SQL looks like:

SELECT *
FROM table
LIMIT 1FOR UPDATE OF t SKIP LOCKED

Note the 1FOR there. Postgres prior to 15 accept this, but Postgres 15 errors.

Looks like makeOrderBy inserts a newline, but makeLocking does not put a newline in.