citusdata / citusdata/citus_docs
CTE behavior: Citus vs pg
- Dominant language
- CSS
- Stars
- 58
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
## Communication goals (e.g. detailed howto vs orientation)
Alert people in case they rely on pg semantics for their CTEs.
### Good locations for content in docs structure
Add a CTE section to https://docs.citusdata.com/en/v7.3/develop/reference_sql.html
## How does this work? (devs)
As pointed out in https://github.com/citusdata/citus/issues/2153:
- We execute CTEs one-by-one, in order of appearance
- CTEs can see the result of other modifying CTEs
- Each CTE may work on different snapshots (read committed semantics)
We can address the third point by using repeatable mode as mentioned in https://github.com/citusdata/citus/issues/1804. A challenge is that repeatable read needs to be set at the start of a transaction block and the CTE might appear mid-transaction block.
Contributor guide
Assessment
This issue has not been assessed yet.