pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: richard coleman <rcoleman.ascentgl@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: how to list privileges on the database object itself via SQL?
Date: Wed, 26 Apr 2023 13:22:59 -0400
Message-ID: <875041.1682529779@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGA3vBvjUiUb+O-UWYU8VNrrPrLrwz+KOg3zqwiWTAAkTChX_A@mail.gmail.com>
References: <CAGA3vBvanu7UBtaaVv9PH25Ko==5F2wewhPWTTra8wqexdDAdQ@mail.gmail.com>
	<870558.1682527243@sss.pgh.pa.us>
	<CAGA3vBvjUiUb+O-UWYU8VNrrPrLrwz+KOg3zqwiWTAAkTChX_A@mail.gmail.com>

richard coleman <rcoleman.ascentgl@gmail.com> writes:
> Thanks, but no.  I am looking for the SQL statement.
> I very rarely venture into psql, unless it's to run an SQL code block from
> the terminal.
> Is there an SQL way to do this?

psql is still a useful reference.  Run it with the -E option and
look at the SQL it issues when you say "\l".  Trim to fit your
requirements.

			regards, tom lane





view thread (26+ messages)  latest in thread

Message-ID: <875041.1682529779@sss.pgh.pa.us>
Permalink:  ../875041.1682529779@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/875041.1682529779@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rcoleman.ascentgl@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: how to list privileges on the database object itself via SQL?
  In-Reply-To: <875041.1682529779@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox