Perhaps use a row_number function in combination with an update trigger?<br><br><a href="http://www.postgresql.org/docs/8.4/interactive/functions-window.html">http://www.postgresql.org/docs/8.4/interactive/functions-window.html</a><br>

<br>Of course, you could just use the row_number function as part of a view when getting the data out rather than storing it. <br><br>Mark<br><br><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 3:48 AM, Robert Buckley <span dir="ltr"><<a href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: rgb(64, 0, 127);">

Hi,<br><br>I have a table containing population statistics.<br><br>I would like to have an column which automatically updates the rank for each dataset. Would I somehow use a sequence to calculate this, or is there another way to do this?<br>

<br>thanks,<br><br>Rob<br><div><br></div>
</div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>