我在与PG::prepare
,ST_GeomFromText
和POINT
.
这有效:
sql = %Q%insert into #{table_name} (latlong, place_name) values (ST_GeomFromText('POINT(0 0)', 4326), $1 )%
conn.prepare('statement1', sql)
这不起作用:
sql = %Q%insert into #{table_name} (latlong, place_name) values (ST_GeomFromText('POINT($1 $2)', 4326), $3 )%
conn.prepare('statement1', sql)
错误:
in `prepare': ERROR: could not determine data type of parameter $1 (PG::IndeterminateDatatype)