What does PENDANT imply/mean in terms of RI?  I could figure out all of the
other syntax.

> -----Original Message-----
> From:	wieck@debis.com [SMTP:wieck@debis.com]
> Sent:	Wednesday, September 29, 1999 9:03 AM
> To:	lockhart@alumni.caltech.edu
> Cc:	wieck@debis.com; tgl@sss.pgh.pa.us; hackers@postgreSQL.org
> Subject:	Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
> 
> Thomas Lockhart wrote:
> 
> >
> > > > >       CONSTRAINTS
> > > > >       DEFERRABLE
> > > > >       DEFERRED
> > > > >       IMMEDIATE
> > > > >       INITIALLY
> > > > >       PENDANT
> > > > >       RESTRICT
> > >     O.K.  - I was able to add them all to ColId without conflicts
> > >     for now.  Let's see what happens after adding the syntax  for
> > >     CREATE CONSTRAINT TRIGGER.
> >
> > Right. Anything which causes trouble can be demoted to ColLabel.
> >
> > >     I'm  not  sure which of them are SQL92 or SQL3, at least they
> > >     are all SQL3 "reserved" words according to the SQL3 draft.
> >
> > According to my Date and Darwen (which is mostly SQL92), all of these
> > except "PENDANT" are SQL92 reserved words. PENDANT is not mentioned,
> > so is presumably an SQL3-ism.
> >
> > Do you want me to update syntax.sgml?
> 
>     Please  be so kind. CREATE CONSTRAINT TRIGGER did not mess up
>     anything, so all these new reserved words appear in ColId and
>     are still available.
> 
> 
> Jan
> 
> --
> 
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me.                                  #
> #========================================= wieck@debis.com (Jan Wieck) #
> 
> 
> 
> ************

Wed, 29 Sep 1999 11:31:58 -0500
"Jackson, DeJuan" <djackson@cpsgroup.com>
RE: RI and PARSER (was: Re: [HACKERS] RI status report #1)
>
> What does PENDANT imply/mean in terms of RI?  I could figure out all of the
> other syntax.

    As far as I understood it:

      CREATE TABLE t1 (a1 integer PRIMARY KEY NOT NULL, b1 text);

      CREATE TABLE t2 (a2 integer NOT NULL, b2 text,
                       CONSTRAINT check_a2
                         FOREIGN KEY (a2)
                         REFERENCES t1 (a1)
                         PENDANT
                         ON DELETE CASCADE
                         ON UPDATE CASCADE
                         INITIALLY DEFERRED);

    This  setup requires, that for each key in t1.a1 at least one
    reference  from  t2.a2  MUST  exist.  So  this  is  a  cyclic
    integrity check.  I'm not sure if removing the last reference
    automatically removes the PK row from t1 or if it  raises  an
    error. Can someone clearify here?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #



Wed, 29 Sep 1999 19:25:32 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)