TRUNCATE violates Referential Integrity

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: TRUNCATE violates Referential Integrity
Date: 2000-06-25 22:26:16
Message-ID: 200006252226.e5PMQGe16045@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

This is a problem in release 7.0.2.

I had never heard of the truncate command! It seems that it ought to be
disallowed on a table that is a target for RI checks, since checking that
deletions are OK would frustrate the whole purpose of truncate as opposed
to delete.

------- Forwarded Message

Date: 25 Jun 2000 13:49:14 +0000
From: Grzegorz Stelmaszek <greg(at)tenet(dot)pl>
To: submit(at)bugs(dot)debian(dot)org
Subject: Bug#66232: postgresql: TRUNCATE doesn't check REFERENCE clause

Package: postgresql
Version: 7.0-release-1
Severity: normal

TRUNCATE'ing the table allows rows to be deleted in spite of the REFERENCES
clause pointing to that table. These may bring the db to an inconsistent
state.

...
------- End of Forwarded Message

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Honour thy father and mother; which is the first
commandment with promise; That it may be well with
thee, and thou mayest live long on the earth."
Ephesians 6:2,3

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen van Egmond 2000-06-26 16:21:46 Bug report: selects rope in tables they shouldn't
Previous Message Travis Bauer 2000-06-25 21:35:18 bug fix request for odbc driver

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-06-26 00:25:02 SELECT FOR UPDATE breaks unique constraint
Previous Message Ryan Kirkpatrick 2000-06-25 22:08:55 Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!