citusdata / citusdata/citus

Multi-shard modification queries rejects IMMUTABLE function with column references

Open
#1,380 7 comments 0 reactions 0 assignees View on GitHub
sql
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

When trying to run
```
SELECT master_modify_multiple_shards('UPDATE geonames.geonames
SET geometry = ST_PointFromText(''POINT('' || longitude || '' '' || latitude || '')''
');
```
Citus returns with
```
ERROR: STABLE functions used in UPDATE queries cannot be called with column references
```

The problem is [ST_PointFromText](https://github.com/postgis/postgis/blob/87ed234dd5e5298462b7e352d796ac6d132d4465/postgis/postgis.sql.in#L4679-L4686) is defined as an IMMUTABLE function, so shouldn't this work? Or what is the STABLE function that is causing the error? Any functions used by `ST_PointFromText()` appear to be IMMUTABLE as well.

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.