Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: After updat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 12 Topic 3425 of 3661
Post > Topic >>

Re: After updating dataset the record goes to the end of the dataset

by depesz@[EMAIL PROTECTED] (hubert depesz lubaczewski) Apr 22, 2008 at 01:02 PM

On Tue, Apr 22, 2008 at 12:31:54PM +0200, Nacef LABIDI wrote:
> When I have tested this with SQLServer it works well, since the rows
doesn't
> change position on the DB.
> I hope that you understand my issue and I will provide any explanations
if
> someting isn't clear enough.

well. in postgresql rows do change position. and even in mssql depending
on position from table files is a very big mistake.

suggestion - add default "order by" by some id or timestamp column, and
modify it to fit your user preferences.

for example:

let's say that you have rows with ids: 1,2,3

by default you get them in order: 1,2,3.

if user wants to change the ordering to 2,3,1, store his preferences in
some other table and do it like this:

select t.* from table t join preferences p on t.id = p.id_in_table where
p.user = 'current user' order by p.ordering;

regards,

depesz


-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 12 Posts in Topic:
After updating dataset the record goes to the end of the dataset
nacef.l@[EMAIL PROTECTED]  2008-04-22 11:54:26 
Re: After updating dataset the record goes to the end of the dat
nacef.l@[EMAIL PROTECTED]  2008-04-22 12:10:41 
Re: After updating dataset the record goes to the end of the dat
depesz@[EMAIL PROTECTED]   2008-04-22 12:15:23 
Re: After updating dataset the record goes to the end of the
craig@[EMAIL PROTECTED]   2008-04-22 20:46:30 
Re: After updating dataset the record goes to the end of the dat
spam_eater@[EMAIL PROTECT  2008-04-22 12:11:42 
Re: After updating dataset the record goes to the end of the dat
singh.gurjeet@[EMAIL PROT  2008-04-22 15:42:37 
Re: After updating dataset the record goes to the end of the dat
nacef.l@[EMAIL PROTECTED]  2008-04-22 12:31:54 
Re: After updating dataset the record goes to the end of the dat
depesz@[EMAIL PROTECTED]   2008-04-22 13:02:14 
Re: After updating dataset the record goes to the end of the
padam.singh@[EMAIL PROTEC  2008-04-22 16:32:57 
Re: After updating dataset the record goes to the end of the dat
pavan.deolasee@[EMAIL PRO  2008-04-22 16:15:10 
Re: After updating dataset the record goes to the end of thedata
nacef.l@[EMAIL PROTECTED]  2008-04-22 15:00:21 
Re: After updating dataset the record goes to the end of thedata
scott.marlowe@[EMAIL PROT  2008-04-22 09:16:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Sep 5 6:26:14 CDT 2008.