Re: AW: Proposal: TRUNCATE TABLE table RESTRICT - Mailing list pgsql-hackers

From JanWieck@t-online.de (Jan Wieck)
Subject Re: AW: Proposal: TRUNCATE TABLE table RESTRICT
Date
Msg-id 200006091104.NAA04376@hot.jw.home
Whole thread Raw
In response to AW: Proposal: TRUNCATE TABLE table RESTRICT  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
Zeugswetter Andreas SB wrote:
>
> Truncate should probably check if all referencing tables are empty
> and fail if not. Truncate should imho not lead to a violated constraint
> situation.
> Strictly speaking the current situation is more or less a bug.
>
   Not  anything is possible with RI, so the DB schema might use   regular triggers and/or rules as well.
   Why  not  reject  TRUNCATE  at  all  if  the   relation   has   rules/triggers?  IMHO the only safe way.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [PATCHES] Patch for more readable parse error messages
Next
From: Bruce Momjian
Date:
Subject: Re: ALTER TABLE DROP COLUMN