Search Postgresql Archives

Re: Alter Table Command Rearranges Rows

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

 



On Sep 17, 2010, at 16:12 , Carlos Mennens wrote:

> I noticed that my database was in order based on my primary key column
> called 'id' which when from 1 (first) to 6 (last). Today I had to edit
> table data which wasn't anything crazy:
> 
> team=#ALTER users SET name = 'David' WHERE id = '1';
> UPDATE 1

This isn't valid syntax: I believe you issued UPDATE users....

Postgres (nor any other SQL RDBMS) does not guarantee row order unless you specify it with an ORDER BY clause.

Michael Glaesemann
grzm seespotcode net




-- 
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