citusdata / citusdata/pg_shard

Prohibit non-IMMUTABLE functions in multi-shard SELECT queries

Open
#60 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Though all (non-side-effecting) functions are safe to execute in a single-shard `SELECT` query, the same is not true for multi-shard SELECTs. In particular, a function such as `random()` or `now()` would return a different value for each shard and so the query results would not represent a consistent view of the world.

This may overlap somewhat with #47, but that issue is more concerned with single-shard ramifications. We've noticed this bug affects multi-shard queries as well, so they'll need similar treatment.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.