Jump to content

Acess tables PostgreSQL


walter21

Recommended Posts

Hello, my walter21_walter user is not able to query on tables with schema that is not public, I was only able to access tables within the public schema, even granting privileges to that user in other schemas, I want to know if I have to put the user walter21_walter as owner for all tables of all schemas?

 

Link to comment
Share on other sites

Thanks for replying Krydos, I have already done this, I am sending the printscreen as is, I assign all the privileges to user walter21_walter even so he can only access the tables in schema public, I am sending a printscreen that who is as owner is walter_cidade , but I did not create this user.

https://prnt.sc/ibc39c

https://prnt.sc/ibc333

Edited by walter21
Link to comment
Share on other sites



Does someone else have access to your account?


yes, someone else had access to the database, but it was the root administrator wolstech, he helped me a lot, he imported the database for me, why can not import through the pgphpadmin interface, why the bank is a little big, I believe that without intention he put the owner of the database that user walter21_cidade, instead of walter21_walter, how do you Krydos assign the walter21_cidade bank to the owner walter21_walter? Thanks in advance. Allow me to apologise for my English

Edited by walter21
Link to comment
Share on other sites

So if I create a user with the same name of the current bank owner (walter_cidade) and grant the user access to the bank, this solves my problem, am I right?

 

edit: I tried and I can not, show this message

 
Postgres :: adduser (cidade, walter21) failed: (XID ecr2rg) The database "walter21_cidade" already exists, and you, "walter21", are not allowed to create a user with the same name.
Edited by walter21
Link to comment
Share on other sites

I can't reassign these for you because the server doesn't have enough memory. Maybe Krydos would know a better way to do it.

 

I suppose the worst case is we drop the database and start over with the permissions correct this time...

walter21_cidade=# reassign owned by walter21_cidade TO walter21_walter
walter21_cidade-# \g
WARNING:  out of shared memory
ERROR:  out of shared memory
HINT:  You might need to increase max_locks_per_transaction.
walter21_cidade=#

Link to comment
Share on other sites

I'd actually recommend moving to Ricky or Tommy if you can before I import this again. That way you have the correct version of postgres to go with this as well.

 

Also, please drop the existing database and recreate it if you want me to rerun this. Let me know which user should own the content, and which database the content should be imported into this time around. I'll assume the two files are still in your home folder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...