Search Postgresql Archives

Re: insert order question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ya, I'm sort of coming to that conclusion because of a different consideration.  I'm worried about whether or not the triggers will be fired immediately after each record inserted, or once ot the end, or something else.  Just too risky.  I'm going to go with the discrete insert statements in the order I desire.

Thanks

-----Original Message-----
From: Tom Lane [mailto:tgl@xxxxxxxxxxxxx] 
Sent: Thursday, May 12, 2011 4:06 PM
To: Gauthier, Dave
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  insert order question 

"Gauthier, Dave" <dave.gauthier@xxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux