May I suggest PgAdmin GUI From: richard coleman <rcoleman.ascentgl@xxxxxxxxx>
Tom, Thanks for that. It still seems rather weird that there isn't a more straightforward way to get access to that information. Also the SQL generated by psql -E doesn't seem to work on earlier versions of PostgreSQL: SELECT d.datname as "Name", -- start this section works in pg15, but not in pg11 -- end this section works in pg15, but not in pg11 Even then, the results are a potentially very long concatenated string, or originally an array, in the "Access privileges" column. Are you sure there isn't a more straightforward way to access this information? Are you saying that the only place this information is stored is in an array in the datacl column of the pg_catalog.pg_database table? If that's the case then I am going to be forced to either write code to parse out that array, or write a looping union of multiple "has_database_privilege()" calls. Either case seems like overkill to get such basic information out of PostgreSQL.... rik. On Wed, Apr 26, 2023 at 1:22 PM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
|