Re: Sometimes referential integrity seems not to work
От | Stephan Szabo |
---|---|
Тема | Re: Sometimes referential integrity seems not to work |
Дата | |
Msg-id | 20040131214655.W11452@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | Re: Sometimes referential integrity seems not to work (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Sometimes referential integrity seems not to work
|
Список | pgsql-sql |
On Sat, 31 Jan 2004, Tom Lane wrote: > Stephan Szabo <sszabo@megazone.bigpanda.com> writes: > > On Mon, 26 Jan 2004, Enio Schutt Junior wrote: > >> In a database I am working, I sometimes have to delete all the records in > >> some tables. According to the referential integrity defined in the creation > >> of the tables, postmaster should not delete the records, but it does. I have > >> used the following commands: "delete from table_1" and "truncate table_1". > >> ... > >> can the postgres user delete records despite referential integrity? > > I think the first PG release or two that had TRUNCATE TABLE would allow > you to apply it despite the existence of foreign-key constraints on the > table. Recent releases won't though. Yeah, truncate didn't worry me much, but the implication that delete from table_1; worked did.
В списке pgsql-sql по дате отправления: