Re: Help with restoring a dump in Tar format? (dependencies/ordering)

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with restoring a dump in Tar format? (dependencies/ordering)
Date: 2017-06-06 01:44:06
Message-ID: CAKFQuwZPXBh2PaJjDLvX85Tyk67wC3r=o9o8umoZDPQoO8roNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 5, 2017 at 6:21 PM, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

> I do get the "make \d show relevant information" argument and that is one
>> that seems easier to solve...
>>
>
> Maybe I'm missing something, but I'm not sure how you'd solve this or
> change what \d shows for a table. Right now I get to see this in my \d:
>
> "authorized_approvers_only" CHECK (approved_by IS NULL OR has_perm(approved_by, 'APPROVE_PAYMENT'::character varying, 'W'::character
> varying))
>
> But when I move that to a trigger, I'll only see the trigger name. Any
> while this procedure would be really short, others not so much, so you
> wouldn't really want to automatically display it inline.
>

​FWIW​

​I wouldn't show the trigger functions but I'd show something like:

CREATE ​trg_tbl2_exists_tbl3_missing_or_vice_versa
TRIGGER ON tbl1 CHANGES EXECUTE func_tbl1
REFERENCES tbl2 CHANGES EXECUTE func_tbl2
REFERENCES tbl3 CHANGES EXECUTE func_tbl3;

FOR tbl1
DEPENDS ON tbl2, tbl3 VIA TRIGGER
​trg_tbl2_exists_tbl3_missing_or_vice_versa

​FOR tbl2
DEPENDED ON BY tbl1 VIA TRIGGER ​​trg_tbl2_exists_tbl3_missing_or_vice_versa

FOR tbl3
DEPENDED ON BY tbl1 VIA TRIGGER ​​trg_tbl2_exists_tbl3_missing_or_vice_versa

I suspect the possibility to enforce that trigger execution doesn't touch
tables other than those specified.

​David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2017-06-06 01:55:09 Re: Unable to install EASM postgre due to error 8023
Previous Message Ken Tanzer 2017-06-06 01:21:24 Re: Help with restoring a dump in Tar format? (dependencies/ordering)