| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | Andreas Tille <andreas(at)an3as(dot)eu>, pgsql-de-allgemein(at)lists(dot)postgresql(dot)org |
| Subject: | Re: ASCII Backup mit korrekter Reihenfolge von Objekten? (Was: Backup lässt Daten der Tabelle "times" weg) |
| Date: | 2022-07-13 20:53:13 |
| Message-ID: | 586de5f3ff79fc758d4cd7824ea20b0143c20602.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-de-allgemein |
On Wed, 2022-07-13 at 17:01 +0200, Andreas Tille wrote:
> Der Einfachheit halber habe ich den Dump mal hierhin gelegt:
>
> http://fam-tille.de/tmp/db/sport.dump.gz
Damit ist alles klar.
Du hast einen CHECK-Constraint definiert, der eine Funktion aufruft, die ein SELECT
auf eine Tabelle macht.
Das darf man nicht:
https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS
"PostgreSQL does not support CHECK constraints that reference table data other than the new
or updated row being checked. While a CHECK constraint that violates this rule may appear
to work in simple tests, it cannot guarantee that the database will not reach a state in
which the constraint condition is false (due to subsequent changes of the other row(s)
involved). This would cause a database dump and reload to fail. The reload could fail even
when the complete database state is consistent with the constraint, due to rows not being
loaded in an order that will satisfy the constraint."
Der konkrete Anlaß für den Fehler ist, daß die Funktion die Tabelle ohne Schemanamen referenziert
und beim Restire ser "search_path" absichtlich leer ist.
Dum mußt eine andere Lösung für das Problem finden.
Liebe Grüße,
Laurenz
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ralf Burger | 2022-07-29 05:33:22 | gibt es eine aktuelle pgTcl-lib für Windows? |
| Previous Message | Andreas Tille | 2022-07-13 15:01:28 | Re: ASCII Backup mit korrekter Reihenfolge von Objekten? (Was: Backup lässt Daten der Tabelle "times" weg) |