I am developing a script in Perl that writes points to a spatial table in Postgis. I use :
my $sth = $dbh->prepare("INSERT INTO gtest (geom) VALUES (GeomFromEWKT('SRID=?;POINT(? ? ?)'));")or
die "Can't prepareSQL: " . $dbh->errstr();;
$sth->execute($srd, $x, $y, $z) or die "Can't write SQL: " . $sth->errstr();;
When I run the script I get an "Can't write SQL error" that is found near 'SRID='.
And when I use select table I get no result.
When I changed the '?' with numbers everything was ok.
Any ideas on how the correct syntax is?