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:10:29
Message-ID: CAKFQuwbHM67Vk5K717x4D7-ch2fTbyZh-BdCwg=g7yHX+DZPsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

> I can't really make this an FK. I can (and probably will) put this into a
>>> trigger. Although it seems like an extra layer of wrapping just to call a
>>> function. I'm curious if there's any conceptual reason why constraints
>>> couldn't (as an option) be restored after all the data is loaded, and
>>> whether there would be any negative consequences of that? I could see if
>>> your data still didn't pass the CHECKs, it's already loaded. But the
>>> constraint could then be marked not valid?
>>>
>>
>> Not sure why just know that if I stay within the guidelines it works, if
>> I do not its does not work:)
>>
>>
> That's fair enough, leaving aside the curiosity part. Usually though the
> things you can't do just aren't allowed. It's easier to overlook something
> that you shouldn't (but can) do!
>
>
​I find in life most things that are prohibited are actually doable -
you're just punished if you get caught doing them. In all seriousness
though I agree it would be nice if that's how this worked; but decades of
historical precedent makes actual preventive enforcement ​difficult if not
impossible.

Since "test your backups" covers this potential problem, and so many
possible others, any non-trivial effort to solve the actual problem is hard
to justify spending time on.

I do get the "make \d show relevant information" argument and that is one
that seems easier to solve, since adding explicit dependencies during
trigger creation would be a purely new feature.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2017-06-06 01:21:24 Re: Help with restoring a dump in Tar format? (dependencies/ordering)
Previous Message Ken Tanzer 2017-06-06 00:59:50 Re: Help with restoring a dump in Tar format? (dependencies/ordering)