Re: [HACKERS] Re: ALTER TABLE DROP COLUMN

From: wieck(at)debis(dot)com (Jan Wieck)
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Jan Wieck <wieck(at)debis(dot)com>, Don Baccus <dhogaza(at)pacifier(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: ALTER TABLE DROP COLUMN
Date: 2000-02-29 10:31:13
Message-ID: m12Pjvt-0003kgC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing wrote:

> Jan Wieck wrote:
> >
> > Actually, a RESTRICT violation can potentially bypass
> > thousands of subsequent queries until COMMIT. Meaningless
> > from the transactional PoV, but from the application
> > programmers one (looking at the return code of a particular
> > statement) it isn't!
> ...
> > It'll be expensive, compared to current UNIQUE implementation
> > doing it on the fly during btree insert (doesn't it?). But
> > the only way I see.
>
> So currently we have ON UPDATE RESTRICT foreign keys :)

For foreign keys we actually have ON UPDATE/DELETE NO ACTION
(plus SET NULL and SET DEFAULT). Only the RESTRICT isn't
fully SQL3. I just had an idea that might easily turn it to
do the right thing.

For the UNIQUE constraint, it's totally wrong (and not
related to FOREIGN KEY stuff at all). The UNIQUE constraint
isn't deferrable at all, and it looks for violations on a per
row level, not on a per set level as it should.

Jan

--

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak - Zakkr 2000-02-29 10:38:52 Re: [HACKERS] Re: [PATCHES] NO-CREATE-TABLE and NO-LOCK-TABLE
Previous Message Jan Wieck 2000-02-29 10:22:27 Re: [HACKERS] Re: ALTER TABLE DROP COLUMN