Protect extension' internal tables - how?

From: Nikita Malakhov <hukutoc(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Protect extension' internal tables - how?
Date: 2023-07-15 20:57:30
Message-ID: CAN-LCVMpyEMNgih4K6vxpn=gRfgxU9kPP27r8y6-ZGHQABbdvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers!

While working on an extension I encountered a quite tricky question -
the extension (with functions in C) creates tables during function calls,
these tables must be protected from direct users' queries, at the same
time they must remain accessible for all functions of this extension
for all users allowed to use this extension.

Could you please advise or give some hint on what is the correct (and
secure) way to implement this?

Currently I use the owner of the extension as owner when creating
such a table inside the function, but maybe there are some pitfalls
in this kind of solution?

Thanks in advance.

--
Regards,
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
https://postgrespro.ru/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2023-07-15 21:13:33 Re: Fix search_path for all maintenance commands
Previous Message Andres Freund 2023-07-15 18:19:16 Re: Inefficiency in parallel pg_restore with many tables