muchas gracias a todos las funciones split_part y el manejo de puntos como array me han servido de mucho, son lo que necesitaba
split_part(campo1::text,',',1), split_part(campo1::text,',',2), campo1[0] as x, campo1[1] as y El 19 de agosto de 2011 11:31, Hellmuth Vargas <hiv...@gmail.com> escribió: > Hola > según veo en la documentación, para acceder a los componentes x,y de > un datos point seria similar al de los arreglos por lo tanto para x > seria campo[0] y para y campo[1] > > osea que un select tentativo seria > > SELECT campo_punto[0] AS x, campo_punto[1] AS y FROM tabla.... > > > http://www.postgresql.org/docs/8.4/static/functions-geometry.html > > "It is possible to access the two component numbers of a point as > though the point were an array with indexes 0 and 1. For example, if > t.p is a point column then SELECT p[0] FROM t retrieves the X > coordinate and UPDATE t SET p[1] = ... changes the Y coordinate. In > the same way, a value of type box or lseg can be treated as an array > of two point values." > > 2011/8/19 Miguel Angel Hernandez Moreno <miguel.hdz....@gmail.com>: > > Saludos lista > > > > Tengo un campo tipo point en una tabla, el cual contiene la latitud ( > > coordenada posotiva)y longitud (coordenada negativa) > > > > (-100.298390507273,25.6720346672794) > > > > lo que deseo es hacer un select a este registro pero manejarlo de tal > forma > > que me regrese por separado las coordenadas, > > pense manejarlo con expresiones regulares en uan funcion de postgres y > > evaluar el registro > > > > pero no se si podria hacer mejor solo en un select > > > > -- > > ISC Miguel Angel Hernandez Moreno > > > > > > > > -- > Cordialmente, > > Ing. Hellmuth I. Vargas S. > - > Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda@postgresql.org > ) > Para cambiar tu suscripción: > http://www.postgresql.org/mailpref/pgsql-es-ayuda > -- ISC Miguel Angel Hernandez Moreno