Accessing referential constraint information with minimal permissions - Mailing list pgsql-general

From Avin Kavish
Subject Accessing referential constraint information with minimal permissions
Date
Msg-id CAN5h1oTXSiRGLWvdQff5V32YGjWLKzaAkW2mm80_iGMJcUMMbw@mail.gmail.com
Whole thread Raw
Responses Re: Accessing referential constraint information with minimal permissions
List pgsql-general
Hello,

I want to programmatically read all the references in a database. Ideally, I want to do it with read-only permissions to the table. Is it possible?

I know the information is in `information_schema.referential_constraints`, but apparently reading that information requires having write permissions to the tables that have references. I don't know why it's designed like that. I think knowing the relationships between tables is in the same class of privileges as knowing the columns in the tables. (which you can do by reading the `columns` view with just SELECT permissions)

Anyway, is there a workaround for this? If not, what is the least destructive write permission I can give a user who wants this access?

Cheers,
Avin.

pgsql-general by date:

Previous
From: John McKown
Date:
Subject: Re: Why can't lseek the STDIN_FILENO?
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: Accessing referential constraint information with minimal permissions