Update Ordering Using Non-Indexed Fields

From: Benjamin Hurt <bhurt544(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Update Ordering Using Non-Indexed Fields
Date: 2012-05-11 22:51:56
Message-ID: 1336776716.98079.YahooMailClassic@web160501.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have a table foo (d,f,mj,mn) where (d,f) is the primary unique key and the only index. I've added a new sequence and a new integer column v and would like to insert into v using this new sequence but using the sort order of (mj,mn) instead of (d,f), which is how it's working if I do a simple "update foo set v = nextval('inc')". What's the best way to accomplish this ?

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel Staal 2012-05-13 00:08:42 Text search language field
Previous Message Jayadevan M 2012-05-11 03:27:00 Re: I am NOT a programmer!