Skip site navigation (1) Skip section navigation (2)

RI Types

From: Michael Fork <mfork(at)toledolink(dot)com>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: RI Types
Date: 2000-12-02 23:27:58
Message-ID: Pine.BSI.4.21.0012021815310.28448-100000@glass.toledolink.com (view raw or flat)
Thread:
Lists: pgsql-hackers
I am trying to set the update and delete rules that are returned from the
ODBC driver and the spec has the following to say:

SQL_NO_ACTION: If a delete of a row in the referenced table would cause a
"dangling reference" in the referencing table (that is, rows in the
referencing table would have no counterparts in the referenced table),
then the update is rejected. (This action is the same as the SQL_RESTRICT
action in ODBC 2.x.)

What I need to know is if RI_FKey_noaction_del and RI_FKey_restrict_del
procedures are functionally the same. The ODBC (which I would hope
conforms to SQL 9x) spec has 4 types of RI (CASCADE, NO_ACTION, SET_NULL,
SET_DEFAULT), and Postgres appears to have 5 (RI_FKey_cascade_del,
RI_FKey_noaction_del, RI_FKey_restrict_del, RI_FKey_setdefault_del,
RI_FKey_setnull_del), which leads me to belive that restrict and noaction
are the same thing, and the one that is used depends on what the user puts
in the REFERENCES line.

Am I correct?

Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio

On Fri, 1 Dec 2000, Stephan Szabo wrote:

> 
> It's representing a single null I believe.  I'm not
> sure if in general it's an octal or decimal number
> but 3 digits for the value of the character.
> 
> Stephan Szabo
> sszabo(at)bigpanda(dot)com
> 
> On Fri, 1 Dec 2000, Michael Fork wrote:
> 
> > What are these characters:
> > 
> > \000
> > 
> > are they 3 nulls? a null followed by 2 zeros?
> > 
> > The reason I have been asking is that I am adding foreign key support to
> > the ODBC driver :)
> 
> 



pgsql-hackers by date

Next:From: Don BaccusDate: 2000-12-02 23:43:49
Subject: Re: RI Types
Previous:From: Joel BurtonDate: 2000-12-02 23:07:58
Subject: RI tutorial hack reading needed

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group