[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-hackers
Subject:    Re: [HACKERS] [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows
From:       Albert Cervera i Areny <albert () nan-tic ! com>
Date:       2012-10-21 5:50:47
Message-ID: 201210210750.47260.albert () nan-tic ! com
[Download RAW message or body]

A Dimecres, 17 d'octubre de 2012 19:13:47, Merlin Moncure va escriure:
> On Wed, Oct 17, 2012 at 9:29 AM, Peter Geoghegan <peter@2ndquadrant.com> 
wrote:
> > On 17 October 2012 14:53, Merlin Moncure <mmoncure@gmail.com> wrote:
> >> Is that defined in the standard?
> > 
> > RETURNING isn't even defined in the standard.
> 
> Right: Point being, assumptions based on implementation ordering are
> generally to be avoided unless they are explicitly defined in the
> standard or elsewhere.

I don't see how one could use RETURNING if result is not ensured to be in the 
same order as the tuples supplied. What's the use of RETURNING supplying data 
in random order?

-- 
Albert Cervera i Areny
http://www.NaN-tic.com
Tel: +34 93 553 18 03

http://twitter.com/albertnan 
http://www.nan-tic.com/blog

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans'; font-size:12pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">A Dimecres, 17 d'octubre de 2012 19:13:47, Merlin Moncure va \
escriure:</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; On \
Wed, Oct 17, 2012 at 9:29 AM, Peter Geoghegan &lt;peter@2ndquadrant.com&gt; \
wrote:</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
On 17 October 2012 14:53, Merlin Moncure &lt;mmoncure@gmail.com&gt; wrote:</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt;&gt; Is that defined \
in the standard?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; RETURNING isn't \
even defined in the standard.</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; Right: Point being, assumptions based on implementation \
ordering are</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
generally to be avoided unless they are explicitly defined in the</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; standard or \
elsewhere.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I don't see how one could use \
RETURNING if result is not ensured to be in the same order as the tuples supplied. \
What's the use of RETURNING supplying data in random order?</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br />-- </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Albert Cervera i Areny</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a \
href="http://www.NaN-tic.com"><span style=" text-decoration: underline; \
color:#0057ae;">http://www.NaN-tic.com</span></a></p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">Tel: +34 93 553 18 03</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a \
href="http://twitter.com/albertnan"><span style=" text-decoration: underline; \
color:#0057ae;">http://twitter.com/albertnan</span></a> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a \
href="http://www.nan-tic.com/blog"><span style=" text-decoration: underline; \
color:#0057ae;">http://www.nan-tic.com/blog</span></a></p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic