Using QGIS 3.22.11.
I have a project with a layer tree_pt. tree_pt contains 17 point features. I wish to obtain the geometry for each feature in WKT format using SQL. (I have similar layers containing line and polygon features, which I will treat similarly once I have got this working).
Using DB Manager, the following SQL results in what appears to be zero-length strings for each of the 17 features.
SELECT
geom_to_wkt(geometry)
FROM tree_pt
I would expect the output to contain 17 rows, each containing the geometry in WKT format, e.g. Point (564.13737133 214.32729203), or similar.
Is there something wrong in my SQL or approach, or is this a bug?
st_aswkt
but I'm a postgis userselect geom_from_wkt('POINT(0 1)') from tree_pt
returns empty,select nonsuch('POINT(0 1)') from tree_pt
returns "no such function".