| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Enio Schutt Junior <enio(at)pmpf(dot)rs(dot)gov(dot)br> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Sometimes referential integrity seems not to work |
| Date: | 2004-01-31 20:45:43 |
| Message-ID: | 20040131124500.H98710@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Mon, 26 Jan 2004, Enio Schutt Junior wrote:
> In a database I am working, I sometimes have to delete all the records in
> some tables. According to the referential integrity defined in the creation
> of the tables, postmaster should not delete the records, but it does. I have
> used the following commands: "delete from table_1" and "truncate table_1".
> When deleting records individually, referential integrity works (postmaster
> does not allows deletion of records which are referred by another table).
> Is there some difference between deleting records individually or at once?
> Is there any possibility of the user who does this deletion (postgres, normal
> users) affects the behaviour of referential integrity in the tables? That is,
> can the postgres user delete records despite referential integrity?
It shouldn't. Can you give your version information and a complete
standalone example?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | LawyerKill | 2004-01-31 21:50:06 | REPLACE |
| Previous Message | Richard Huxton | 2004-01-31 17:42:00 | Re: Mechanics of Update:Cascade |