pg_dump & RLS

Поиск
Список
Период
Сортировка
От Eduard Català
Тема pg_dump & RLS
Дата
Msg-id CAL54xNZO-9hv+mYJ-0vPzmf_yuj99LfHLiffwOec+KnXj33kfg@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_dump & RLS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi all,
Sorry if this is not the appropriate list, I think so.

- ¿is posible to export using pg_dump only the rows that satisfy a rls check?
- Of course, yes, use the --enable-row-security option in pg_dump
- Yes, but my RLS expression relies on a GUC:
CREATE POLICY my_policy  ON my_table  USING (company_id = current_setting('company_id')::int);
Prior to starting dumping I need to set the company_id GUC into the session, if not, there's no way to only export some rows.

Any ideas? 
- Execute a command before starting the export
- Some kind of login trigger for a special user
- ...

Thank you!

В списке pgsql-general по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: pgbouncer bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump & RLS