From: stepanperlov@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14421: RETURNING statement in DELETE FROM with REFERENCES
Date: Fri, 11 Nov 2016 22:27:11 +0000
Message-ID: <20161111222711.8761.70849@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14421
Logged by: Stepan Perlov
Email address: stepanperlov@gmail.com
PostgreSQL version: 9.5.5
Operating system: ubuntu 14.04
Description:
Hello
CREATE TABLE test(
id bigserial PRIMARY KEY,
parent bigint REFERENCES test(id) ON DELETE CASCADE ON UPDATE CASCADE
);
INSERT INTO test VALUES (1, null);
INSERT INTO test VALUES (2, 1);
INSERT INTO test VALUES (3, 2);
INSERT INTO test VALUES (4, 2);
INSERT INTO test VALUES (5, 2);
INSERT INTO test VALUES (6, 2);
INSERT INTO test VALUES (7, 2);
DELETE FROM test
WHERE id = 2
RETURNING id;
Returns:
id
2
I expect:
id
2
3
4
5
6
7
Thanks
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: stepanperlov@gmail.com
Subject: Re: BUG #14421: RETURNING statement in DELETE FROM with REFERENCES
In-Reply-To: <20161111222711.8761.70849@wrigleys.postgresql.org>
References: <20161111222711.8761.70849@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox