Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable functions in GENERATED columns fail #38

Closed
AbelVM opened this issue Aug 12, 2020 · 1 comment
Closed

Immutable functions in GENERATED columns fail #38

AbelVM opened this issue Aug 12, 2020 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working

Comments

@AbelVM
Copy link

AbelVM commented Aug 12, 2020

Using GENERATED columns using h3-pg functions fail with this message, but the functions are actually IMMUTABLE (as well as the wrapped ones):

ERROR: generation expression is not immutable

Examples:

CREATE TABLE generatetemp (  
	h3_id h3index ,
        geom geometry(Point, 4326) GENERATED ALWAYS AS (h3_to_geometry(h3_id)) STORED	
) ;	

Function: https://github.com/bytesandbrains/h3-pg/blob/master/sql/install/99-postgis.sql#L30

CREATE TABLE generatetemp (  
	geom geometry(Point, 4326),
	h3_id h3index GENERATED ALWAYS AS (h3_geo_to_h3(geom, 10)) STORED	         
) ;	

Function: https://github.com/bytesandbrains/h3-pg/blob/master/sql/install/99-postgis.sql#L22

@zachasme zachasme self-assigned this Aug 13, 2020
@zachasme zachasme added the bug 🐛 Something isn't working label Aug 13, 2020
@zachasme
Copy link
Owner

This is probably because we forgot to include an upgrade-path in bd526aa.

We should mark IMMUTABLE STRICT PARALLEL SAFE in an upgrade-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants