SQL查询里面的一个函数

Nam*_*man 6 sql database postgresql geospatial

我在PostGis上使用PostgreSQL.我正在执行这样的查询:

select st_geomfromtext('point(22 232)',432)
Run Code Online (Sandbox Code Playgroud)

它工作正常.但现在我想通过查询获取值.例如:

select st_geomfromtext('point((select x from data_name where id=1) 232)' , 432)
Run Code Online (Sandbox Code Playgroud)

data_name是我正在使用的一些表并x存储一些值.现在,查询内部被视为字符串,并且不返回任何值.
请帮忙.

ERROR: syntax error at or near "select"
Run Code Online (Sandbox Code Playgroud)

mur*_*tgu 2

尝试这个:

select st_geomfromtext('point(' || x || ' 232)', 432) from data_name where id=1
Run Code Online (Sandbox Code Playgroud)