我们有两个(PostgreSQL 9.2)表。首先cities:
 loc_id    | integer               | not null
 name      | character varying(40) | 
 gps_coord | point                 | 
其次是weather_stations:
 s_id        | integer                | not null
 location    | character varying(255) | not null
 height      | integer                | 
 city_loc_id | integer                | 
 gps_coord   | point                  | 
使用它们的点坐标,我们如何找到最近的气象站城市?我想用这个城市来填充weather_stations(目前都是NULL)的外键,即city_loc_id. (拥有这样的外键是个好主意吗?)
我意识到我必须以某种方式使用最近点运算符(##),但是在编写查询时我有点迷茫。