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

Multi-table truncate

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Multi-table truncate
Date: 2005-01-26 14:10:38
Message-ID: 20050126141038.GA4403@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-patches
Hackers,

This is my multi-table truncate patch.  Includes doc changes and couple
new regression tests.

Note the following excerpt from the temp regression test:

+ BEGIN;
+ CREATE TEMP TABLE temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
+ NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "temptest3_pkey" for table "temptest3"
+ CREATE TEMP TABLE temptest4(col int REFERENCES temptest3);
+ COMMIT;
+ ERROR:  invalid ON COMMIT and foreign key combination
+ DETAIL:  Table "temptest4" references "temptest3", but they don't have the same ON COMMIT setting

I haven't investigated whether we can reject the foreign-key/on-commit
combination at create table time, rather than commit time.  Maybe it's
worth doing, but then apparently on-commit-actions is not used a lot
(nobody saw the bug I previously reported).

Please review and consider for application.

Thanks,

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Las mujeres son como hondas:  mientras más resistencia tienen,
más lejos puedes llegar con ellas"  (Jonas Nightingale, Leap of Faith)

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2005-01-26 19:24:38
Subject: Re: Fix for SHGetSpecialFolderPath
Previous:From: ITAGAKI TakahiroDate: 2005-01-26 13:06:46
Subject: Re: WAL: O_DIRECT and multipage-writer

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