<div dir="ltr">Hi Denis,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-18 11:51 GMT+02:00 Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm bumbing my head against the wall.</div><div><br></div><div>I have an error "function  st_x(geometry) does not exist" in an update statement which I don't understand. If I copy the same exact line in a select statement I get no error...</div><div><br></div><div>Here is the update statement:</div><div><br></div><div><div>update qwat_od.network_element set </div><div><span style="white-space:pre-wrap">       </span>label_1_x = ST_X(ST_GeomFromEWKB(ST_<wbr>Fineltra(ST_SetSRID(ST_<wbr>MakePoint(label_1_x,label_1_y)<wbr>,21781), 'chenyx06.chenyx06_triangles', 'the_geom_lv03', 'the_geom_lv95')))</div><div>where label_1_x is not null;</div></div><div><br></div><div>and the select statement:</div><div><br></div><div><div>select ST_X(ST_GeomFromEWKB(ST_<wbr>Fineltra(ST_SetSRID(ST_<wbr>MakePoint(label_1_x,label_1_y)<wbr>,21781), 'chenyx06.chenyx06_triangles', 'the_geom_lv03', 'the_geom_lv95')))</div><div>from qwat_od.network_element</div><div>where label_1_x is not null;</div></div><div><br></div><div><br></div><div>How come that the select succees while not the update???<br></div></div></blockquote><div><br></div><div>It looks like you are out of scope during the update execution, I mean, it looks like the update is not able to identify the schema where PostGIS functions and operators are defined. If this is the case, you could try to fully-qualify the function during its execution<br><br>[...]<br></div><div>set <span style="white-space:pre-wrap"></span>label_1_x = <schema>.ST_X(<schema>.ST_GeomFromEWKB(<schema>.ST_<wbr>Fineltra(<schema>.ST_SetSRID(<schema>.ST_<wbr>MakePoint(label_1_x,label_1_y)<wbr>,21781), 'chenyx06.chenyx06_triangles', 'the_geom_lv03', 'the_geom_lv95')))</div><div>[...]<br><br></div><div>where <schema> is the name of the schema where PostGIS functions are defined - note, you probably need to fully-qualify the rest of the functions.<br><br></div><div>You can check the schema through the psql command \df.<br><br></div><div>Hope this help,<br></div><div>Giuseppe.<br></div></div></div></div></div>