Result order of Insert ... returning

From: fsfeel <fsfeel(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Result order of Insert ... returning
Date: 2010-03-16 23:08:38
Message-ID: e6162692-12ba-49ad-91a6-f2ae87dd9d30@g11g2000yqe.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!
I'm using INSERT ... RETURNING with multiply values, for example
INSERT INTO links.tags (name) VALUES ('tag x'), ('tag y') RETURNING
id, name
and fetch result. Is it guaranteed that order of returned rows will
always match order of values (that is, first returned row will be with
name='tag x' and second with 'tag y') or not? If not, is there any
nice method to order the result accordingly or i have to do it in
application (e.g. comparing "name"s)?
Thanks.

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2010-03-16 23:38:13 Re: app table names
Previous Message Justin Graf 2010-03-16 21:25:39 Re: app table names