pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Enio Schutt Junior <enio@pmpf.rs.gov.br>
Cc: pgsql-sql@postgresql.org
Subject: Re: Sometimes referential integrity seems not to work
Date: Sat, 31 Jan 2004 12:45:43 -0800 (PST)
Message-ID: <20040131124500.H98710@megazone.bigpanda.com> (raw)
In-Reply-To: <20040126175147.B3BD046E09@mail.passofundo.rs.gov.br>
References: <20040126175147.B3BD046E09@mail.passofundo.rs.gov.br>


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?



view thread (10+ messages)  latest in thread

Message-ID: <20040131124500.H98710@megazone.bigpanda.com>
Permalink:  ../20040131124500.H98710@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040131124500.H98710@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, enio@pmpf.rs.gov.br
  Subject: Re: Sometimes referential integrity seems not to work
  In-Reply-To: <20040131124500.H98710@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox