On 10/24/2010 05:09 PM, Andrew Dunstan wrote:
>
>
> select enum_oid, row_number() over () as sort_order
> from unnest(null::myenum) as enum_oid
>
>
Of course, I meant:
select enum_label, row_number() over () as sort_order
from unnest(enum_range(null::myenum)) as enum_label
cheers
andrew