Skip to content

Geometry subtype not inferred for function returns #41

Open
@apjoseph

Description

@apjoseph

With

    "postgraphile": "4.12.2",
    "@graphile/postgis": "0.1.0",

The following function will return a geometry interface as a return type instead of a point geometry. This is particularly frustrating for computed columns on tables (for example generating a centroid for a polygon geometry).

CREATE FUNCTION myschema.mytable_pos(mytable myschema.mytable) RETURNS geometry(Point,4326) AS $$
SELECT st_pointonsurface(geom)
$$ LANGUAGE sql STABLE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions