[Tile-serving] [osm2pgsql] delete_node failed: ERROR: prepared statement "delete_node" does not exist (#100)
iero
notifications at github.com
Thu Oct 31 17:32:26 UTC 2013
Nice, I will test the next os x release of osm2pgsql and I will confirm you
if everything is OK with mavericks version
Have a nice day
Greg
--
Des naifs ne savaient pas que c'etait impossible, alors ils l'ont fait.
On 31 oct. 2013, at 17:49, apmon <notifications at github.com> wrote:
Thanks for the error report.
I think I might now know what is going on.
It isn't so much the semicolon that is the issue, but the comma after the
". Or better to say it is missing the .prepare_intarray before the
"delete_nodes" statement.
instead of:
.prepare = "PREPARE insert_node (" POSTGRES_OSMID_TYPE ", double precision,
double precision, text[]) AS INSERT INTO %p_nodes VALUES ($1,$2,$3,$4);\n"
"PREPARE get_node (" POSTGRES_OSMID_TYPE ") AS SELECT lat,lon,tags FROM
%p_nodes WHERE id = $1 LIMIT 1;\n"
"PREPARE get_node_list(" POSTGRES_OSMID_TYPE "[]) AS SELECT id, lat, lon
FROM %p_nodes WHERE id = ANY($1::" POSTGRES_OSMID_TYPE "[])",
"PREPARE delete_node (" POSTGRES_OSMID_TYPE ") AS DELETE FROM %p_nodes
WHERE id = $1;\n",
it should read:
.prepare = "PREPARE insert_node (" POSTGRES_OSMID_TYPE ", double precision,
double precision, text[]) AS INSERT INTO %p_nodes VALUES ($1,$2,$3,$4);\n"
"PREPARE get_node (" POSTGRES_OSMID_TYPE ") AS SELECT lat,lon,tags FROM
%p_nodes WHERE id = $1 LIMIT 1;\n"
"PREPARE get_node_list(" POSTGRES_OSMID_TYPE "[]) AS SELECT id, lat, lon
FROM %p_nodes WHERE id = ANY($1::" POSTGRES_OSMID_TYPE "[]);",
.prepare_intarray = "PREPARE delete_node (" POSTGRES_OSMID_TYPE ") AS
DELETE FROM %p_nodes WHERE id = $1;\n",
The current code works "perfectly fine" on my system, but my guess it
depends on the behaviour of the compiler. The compiler on my system seems
to interpret the incorrect code in the intended way and puts the
"delete_nodes" string into the prepare_intarray slot anyway presumably due
to the ordering of the struct initialiser. Presumably the compiler used to
build the mac binaries behave differently and doesn't produce code that
happens to be correct.
—
Reply to this email directly or view it on
GitHub<https://github.com/openstreetmap/osm2pgsql/issues/100#issuecomment-27503530>
.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/100#issuecomment-27507502
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20131031/7ededa92/attachment.html>
More information about the Tile-serving
mailing list