I'm sorry I realized that I only need to know which users have permissions to the table which I can do through
$ psql -t
SELECT grantee
FROM information_schema.role_table_grants
WHERE table_name='table_name'
GROUP BY grantee;
thanks!
On 02/16/2018 01:13 PM, chris wrote:
Thanks for the quick response.
That does not work for what I need because I only need the owner and permissions of one table, I need the grant to look like the output that pg_dump displays.
ex:
GRANT ALL ON TABLE testing_cdc TO bob;
--
-- PostgreSQL database dump complete
--
I need a way which my script can isolate the owner's name and set it to a variable on its own. Same with grant.
Thanks
On 02/16/2018 01:05 PM, Melvin Davidson wrote: