Get the latest tech news

A PostgreSQL planner semi-join gotcha with CTE, LIMIT, and RETURNING


How a seemingly straightforward DELETE query using a CTE and LIMIT returned more rows than expected due to query planner optimization.

A PostgreSQL planner gotcha with CTEs DELETE and LIMIT

Get the Android app

Or read this on Hacker News

Read more on:

Photo of limit

limit

Photo of CTE

CTE

Photo of PostgreSQL planner

PostgreSQL planner

Related news:

News photo

Hedge Funds Are Pocketing Much of Their Clients' Gains with 'No Limit' Fees

News photo

LA Wildfires Push California Insurance Market To Its Limit

News photo

T2 Linux SDE 24.12 'Sky's the Limit!' Released With 37 ISOs For 25 CPU ISAs