Cela me rend fou. La requête suivante fonctionne tout à fait bien au niveau local, mais quand je ne le tester sur travis-ci et en jetant l'erreur:Postgresql requête fonctionne localement, mais échoue sur Travis CI
java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "select" Position: 39
Espérons que quelqu'un peut voir quelque chose que je ne peux pas.
Voici mes tableaux:
+----------+---------------+
| ways |
+----------+---------------+
| way_id | bigint |
| node_ids | bigint array |
| rep_lat | float(9) |
| rep_lon | float(9) |
+----------+---------------+
+---------+-----------+
| nodes |
+---------+-----------+
| node_id | bigint |
| lat | float(9) |
| lon | float(9) |
+---------+-----------+
Voici ma question:
update ways
set (rep_lat, rep_lon) =
(
select lat, lon
from nodes
where nodes.node_id = ways.node_ids[array_length(ways.node_ids, 1)/2]
)