Re: [GENERAL] Disabling inheritance with query.

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: [GENERAL] Disabling inheritance with query.
Дата
Msg-id CAOR=d=3hgde1KACiOyqZ71Qr6N9sLO4C25muvAVR45j11kT9SQ@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Disabling inheritance with query.  (Edmundo Robles <edmundo@sw-argos.com>)
Список pgsql-general
On Wed, Dec 21, 2016 at 3:36 PM, Edmundo Robles <edmundo@sw-argos.com> wrote:
> Hi!
>
> i need  disable  inheritance  from many tables in a query like
>
> "delete from pg_inherits where inhparent=20473"  instead alter table ...
>
> but  is safe?   which is the risk for  database if  i  delete it?

You could change the source query to use the only keyword:

delete from only parenttable where ...

OR you could write a rule or trigger that rewrote the query to have
the only keyword in it under certain circumstances.


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

Предыдущее
От: Rui Pacheco
Дата:
Сообщение: [GENERAL] UTF-8 on Postgres wire protocol
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] error updating a tuple after promoting a standby