| From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
|---|---|
| To: | Edmundo Robles <edmundo(at)sw-argos(dot)com> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Disabling inheritance with query. |
| Date: | 2016-12-21 23:27:54 |
| Message-ID: | CAOR=d=3hgde1KACiOyqZ71Qr6N9sLO4C25muvAVR45j11kT9SQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Dec 21, 2016 at 3:36 PM, Edmundo Robles <edmundo(at)sw-argos(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2016-12-21 23:43:14 | Re: error updating a tuple after promoting a standby |
| Previous Message | Rui Pacheco | 2016-12-21 23:25:40 | UTF-8 on Postgres wire protocol |