[postgis-users] add a rank to population statistics- is this a case for a sequence?

MarkW mark.wimer at gmail.com
Thu Apr 7 06:05:28 PDT 2011


Perhaps use a row_number function in combination with an update trigger?

http://www.postgresql.org/docs/8.4/interactive/functions-window.html

Of course, you could just use the row_number function as part of a view when
getting the data out rather than storing it.

Mark


On Thu, Apr 7, 2011 at 3:48 AM, Robert Buckley <robertdbuckley at yahoo.com>wrote:

> Hi,
>
> I have a table containing population statistics.
>
> 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?
>
> thanks,
>
> Rob
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110407/4cdf36f7/attachment.html>


More information about the postgis-users mailing list