Postgis geometry columns

Problems with updating view that holds srid for table A2 hosting.

Below is ticket

reply

Robert File lbase@finormile.com
Just made another table as user rfileor1_fladb in database rfileor1_flastate and the spatial reference was saved to the view geometry_columns. User rfileor1_fladb is able to run a select on the view. Haven't tried an update.....
Get this error when trying to update:

column not found in geometry_columns table
CONTEXT: SQL statement "SELECT UpdateGeometrySRID('','',$1,$2,$3)"
PL/pgSQL function updategeometrysrid(character varying,character varying,integer) line 5 at SQL statement
sql: select updategeometrysrid('counties ', 'geom', 4326)

This means I need to get the spatial reference correct when the table is created. Shouldn't be a big deal... I'll read the postgis manual some more.

thanks for the help
December 09, 2016
Robert File lbase@finormile.com
not working. can't even browse view which would be a select statement.
The view gets written to when a table is made.

What about giving user rfileor1 grant priviledges on database
rfileor1_flastate?


On 12/9/2016 9:01 AM, A2 Hosting Support wrote:
>
December 09, 2016
Ajinkya P. - A2 Hosting Support apawar@a2hosting.com
Hello,

Thank you for contacting A2 Hosting Support.

We really feel sorry for an inconvenience caused to you.

The error message you were getting was because your account does not have Super user privileges. We were able to run the given query for you. Can you please recheck the things at your end now?

If the problem persists, feel free to get back to us and we would be happy to investigate it further.

Thanks!

---
Regards,
Ajinkya P
==============================================
A2 Hosting, Inc.
Get Answers Faster! Search our Knowledge Base | http://www.a2hosting.com/kb/
Customer Portal | https://my.a2hosting.com
Affiliate Program | https://affiliates.a2hosting.com
December 08, 2016
Robert File lbase@finormile.com
logged in as rfileor1 via cpanel/phppgadmin and getting this error:
ERROR: permission denied for relation geometry_columns
In statement:
GRANT SELECT on public.geometry_columns TO rfileor1_fladb

tried this on database rfileor1_flastate

user postgres owns views in rfileor1_flastate.puublic.stateparks
December 08, 2016
Chris W. - A2 Hosting Support cworley@a2hosting.com
Hi Robert,

Try running the following MySQL statement (replacing the user gsadmin with whatever you have set):

GRANT SELECT ON public.geometry_columns TO gisadmin

Best Regards,
Chris W.
========================================
Get Answers Faster! Search our Knowledge Base | http://www.a2hosting.com/kb
Customer Portal | https://my.a2hosting.com
Affiliate Program | https://affiliates.a2hosting.com
December 08, 2016
Chris W. - A2 Hosting Support cworley@a2hosting.com
Hi Robert,

I'm looking into this at this time and will update you shortly on my findings.


Best Regards,
Chris W.
========================================
Get Answers Faster! Search our Knowledge Base | http://www.a2hosting.com/kb
Customer Portal | https://my.a2hosting.com
Affiliate Program | https://affiliates.a2hosting.com
December 08, 2016
Robert File lbase@finormile.com
Permission denied for relation geometry_columns

On December 8, 2016 3:06:10 PM EST, A2 Hosting Support <support@a2hosting.com> wrote:
>
December 08, 2016
Tyler E. - A2 Hosting Support email-support@a2hosting.com
Hello Robert,

Please try the following:

GRANT SELECT ON public.geometry_columns TO rfileor1_fladb

Should this not help, please advise and we will further investigate.

Kind Regards,


Tyler E.
========================================
Get Answers Faster! Search our Knowledge Base at http://www.a2hosting.com/kb
Customer Portal | https://my.a2hosting.com
Affiliate Program | https://affiliates.a2hosting.com
December 08, 2016
Tyler E. - A2 Hosting Support email-support@a2hosting.com
Hello Robert,

Thank you for contacting A2 Hosting Support! We understand you're having some issues with an SQL db after uploading, importing and updating.

We're looking into this for you and as soon as we have any relevant information and/or a resolution in place, we'll immediately update you via this ticket.

Kind Regards,

Tyler E.
========================================
Get Answers Faster! Search our Knowledge Base at http://www.a2hosting.com/kb
Customer Portal | https://my.a2hosting.com
Affiliate Program | https://affiliates.a2hosting.com
December 08, 2016
Robert File lbase@finormile.com
I have 2 databases in postgresql/postgis that have views created by user postgres. I am getting access denied to these .
I uploaded a shp2pgsql file that seemed to import OK. It had srid of one. When I went to update this I got the error.

sql:
SELECT UpdateGeometrySRID('statepark','geom',4326)
sql error:
ERROR: permission denied for relation geometry_columns
CONTEXT: PL/pgSQL function updategeometrysrid(character varying,character varying,character varying,character varying,integer) line 32 at FOR over SELECT rows
SQL statement "SELECT UpdateGeometrySRID('','',$1,$2,$3)"
PL/pgSQL function updategeometrysrid(character varying,character varying,integer) line 5 at SQL statement
In statement:
SELECT UpdateGeometrySRID('statepark','geom',4326)

database: rfileor1_flastate user: rfileor1

please advise

thanks for your time

Bob File