Re: insert order question - Mailing list pgsql-general

From Tom Lane
Subject Re: insert order question
Date
Msg-id 5730.1305230732@sss.pgh.pa.us
Whole thread Raw
In response to insert order question  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: insert order question  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
"Gauthier, Dave" <dave.gauthier@intel.com> writes:
> Does...
>                insert into mytbl (col1) values ('a'),('b'),('c');
> ... insert records 'a','b','c' in that order while...
>                insert into mytbl (col1) values ('c'),('b'),('a');
> ... insert the records in the opposite order?

I believe so, but it seems unwise to hard-wire a dependency on that into
your application, since this is only an implementation artifact and not
anything guaranteed by the standard.  If you need the inserts to occur
in a specific order, issue them as separate commands ... you're not
going to save all that much by having them be one command.

            regards, tom lane

pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: insert order question
Next
From: "James B. Byrne"
Date:
Subject: Re: How to handle bogus nulls from ActiveRecord