Opened 10 years ago
Last modified 7 years ago
#2821 new defect
[raster] Raster import fails if "raster_columns" is not readable by the user
Reported by: | strk | Owned by: | Bborie Park |
---|---|---|---|
Priority: | high | Milestone: | PostGIS Fund Me |
Component: | raster | Version: | 2.1.x |
Keywords: | Cc: |
Description
Raster import fails rolling back the whole transaction if the "raster_columns" view is not readable by the user performing the import. Here's the extract:
NOTICE: Returned error message: permission denied for relation raster_columns (42501) CONTEXT: PL/pgSQL function _add_overview_constraint(name,name,name,name,name,name,integer) line 24 at RETURN PL/pgSQL function addoverviewconstraints(name,name,name,name,name,name,integer) line 61 at assignment ERROR: Unable to add the overview constraint. Is the schema name, table name or column name incorrect?
Dunno why it select privileges should be granted for an import. If they are really needed the error message should contain the actual problem (currently only shown by the NOTICE)
Change History (14)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | changed from | to
---|
The overview constraint uses raster_columns to check for its relationship. I suppose the check could bypass raster_columns and go directly to pg_catalog.
comment:3 by , 10 years ago
Uhm, but as I'm seeing this at import time, the importer should know already what the relationship is as it creates it. Can we just not lookup anything in that case ?
comment:4 by , 10 years ago
raster2pgsql (I assume the "importer") doesn't know that you're piping directly to psql.
comment:5 by , 10 years ago
strk -- which version of PostGIS are you using? Can you retest with the latest.
I'm really confused why this is even an issue and am tempeted to close as invalid. We already have raster_columns as publically readable. See our script at bottom of rtpostgis.sql.in
GRANT SELECT ON TABLE raster_columns TO public; GRANT SELECT ON TABLE raster_overviews TO public;
and in my db it is publically readable.
The reason we made it publically readable (same reason we have geography_columns and geometry_columns) readable is because all the views already check if users have rights to said tables. So if they don't they wouldn't show up anyway in there query.
Presumably anyone creating a table via import would have rights to see the table and its constraints. You definitely should not be getting a permission denied and if you are witht eh latest 2.1.3, something else is wrong.
comment:6 by , 10 years ago
The reason why the view is not readable is out of scope here. It could be an upgrade issue, but would need a separate ticket.
This ticket is to get a better error message, or a functional importer, when the view is not readable.
comment:7 by , 10 years ago
I'm more interested in the issue that caused this (upgrade issue) than getting a more functional message for something that should never happen.
comment:9 by , 10 years ago
Component: | postgis → raster |
---|
comment:10 by , 10 years ago
Milestone: | PostGIS 2.1.4 → PostGIS 2.2.0 |
---|
I think this needs more thought. Don't feel comfortable making any changes in 2.1.4 and like I said I think it might be only an upgrade issue if it is at all.
comment:11 by , 10 years ago
Summary: | Raster import fails if "raster_columns" is not readable by the user → [raster] Raster import fails if "raster_columns" is not readable by the user |
---|
comment:12 by , 9 years ago
Priority: | medium → high |
---|
comment:13 by , 9 years ago
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|
Again is this really an issue. I'm temepted to just close this out as an invalid or won't fix.
It is the AddRasterConstraints query that fails, not the import itself.