How to get point in the path? - Mailing list pgsql-general

From LeeXiang
Subject How to get point in the path?
Date
Msg-id 002201c4d91d$de198570$2732a8c0@LeeXiang
Whole thread Raw
List pgsql-general
select seq_id,npoints(latlon_path) as path_points,
(latlon_path[0])[0] as path_pt1_x,(latlon_path[0])[1] as path_pt1_y,
(latlon_path[1])[0] as path_pt2_x,(latlon_path[1])[1] as path_pt2_y,
(latlon_path[2])[0] as path_pt3_x,(latlon_path[2])[1] as path_pt3_y,
(latlon_path[3])[0] as path_pt4_x,(latlon_path[3])[1] as path_pt4_y,
(latlon_path[4])[0] as path_pt5_x,(latlon_path[4])[1] as path_pt5_y
from t_logdata
where seq_id = 1
  My Sql is as above. latlon_path is a field of type:path. Now the record with seq_id = 1 havs five points in this field. I'm trying to read every points in the path. I got the err message:"cannot subscript type path because it is not an array". I use the sql as above to get the two points of a Box. Now that the path is not a point array as box, how can I get points in a path?
  Besides, I'm wondering whether there's an simple way to judge if a Path intersects with a Box or not?
  Thank you for your replying~ I'm waiting for any help~

pgsql-general by date:

Previous
From: Leonardo Mateo
Date:
Subject: Older Windows versions
Next
From: Peter Eisentraut
Date:
Subject: Re: Older Windows versions