Re: Re: can't delete record

From: Cedar Cox <cedarc(at)visionforisrael(dot)com>
To: Michael Fork <mfork(at)toledolink(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Re: can't delete record
Date: 2001-03-07 09:44:42
Message-ID: Pine.LNX.4.21.0103071140470.19003-100000@nanu.visionforisrael.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


I think actually you are wrong, for two reasons. 1. If I was having a
problem with referential integrity, I would get an error message when I
tried to delete. 2. This is the many side of the relationship. It is
perfectly valid to delete a record on the many side. In fact, if I do
attempt to delete the record on the one side, I get the error message.

Strike 1! :)

On Tue, 6 Mar 2001, Michael Fork wrote:

> I believe your foreign key is stopping the delete:
>
> SurID character varying(50) NOT NULL .... ON DELETE RESTRICT,
> ^^^^^^^^^^^^^^^^^^
> Make sure all tuples that SurID references are deleted, then try it
> again.
>
> Michael Fork - CCNA - MCP - A+
> Network Support - Toledo Internet Access - Toledo Ohio
>
> On Tue, 6 Mar 2001, Cedar Cox wrote:
>
> >
> > testdb=# select * from tblstsc1options where sc1optionid=1;
> > sc1optionid | sc1optionname | sc1optionvalue | surid
> > -------------+---------------+----------------+-------
> > 1 | blah | | 1.2
> > (1 row)
> >
> > testdb=# delete from tblstsc1options where sc1optionid=1;
> > DELETE 0
> > testdb=#
> >
--

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message DI Irina Hasenöhrl 2001-03-07 10:18:15 Postgresql and MSACCESS
Previous Message Bjorn Solberg 2001-03-06 21:10:39 Backend dies for DBI