部署 使用 postgis 出现 permission denied for relation spatial_ref_sys 权限问题

stephen · April 20, 2015 · Last by stephen replied at April 20, 2015 · 5954 hits

日志错误:

ActionView::Template::Error (PG::InsufficientPrivilege: ERROR:  permission denied for relation spatial_ref_sys
CONTEXT:  SQL statement "SELECT proj4text FROM spatial_ref_sys WHERE srid = 4326 LIMIT 1"
SELECT "locations".* FROM "locations" WHERE (
      user_id != 1 AND
      ST_DWithin(
        ST_GeographyFromText(
          'SRID=4326;POINT(' || locations.longitude || ' ' || locations.latitude || ')'
        ),
        ST_GeographyFromText(
          'SRID=4326;POINT(-122.031219 37.332331)'
        ),
        5000
      )
    )

上 GOOGLE 搜索过,什么赋予权限,重启都试过了,还是报一样的错! 请教一下!

spatial_ref_sys 表没有权限,你的数据库用户名是什么?

@chenge postgresql 与 postgis

You need to Sign in before reply, if you don't have an account, please Sign up first.