Re: WIP: extensible enums

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: extensible enums
Date: 2010-10-24 21:24:07
Message-ID: 4CC4A3F7.4000208@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2010-10-24 21:25:58 Re: Segfault in 9.0 inlining SRF
Previous Message Andrew Dunstan 2010-10-24 21:20:55 Re: WIP: extensible enums