Thread: Viewing enum values for custom type
Is there an issue way to view the possible enum values for a custom type in PGAdmin3? Or is my only real option to run a query like:
select enum_range(null::MyCustomTypeT)
Thanks!
-Sean
Le 09/11/2010 01:11, Sean Laurent a écrit : > Is there an issue way to view the possible enum values for a custom type in > PGAdmin3? Or is my only real option to run a query like: > > select enum_range(null::MyCustomTypeT) > You should see them in the type properties and in the type dialog properties. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
On Wed, Nov 10, 2010 at 9:02 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 09/11/2010 01:11, Sean Laurent a écrit :> Is there an issue way to view the possible enum values for a custom type inYou should see them in the type properties and in the type dialog
> PGAdmin3? Or is my only real option to run a query like:
>
> select enum_range(null::MyCustomTypeT)
>
properties.
Okay. A couple really really dumb questions. With v1.12.1, where do I find type properties? And how do I access the type dialog properties? When I look at a specific table, I can see the custom type listed on the dependencies tab, but I can't do anything with. Obviously I can see it listed as the data type for a column that uses the custom type, but again, I can't do anything with the custom type. And I don't see custom types listed under any of the catalogs or schemas.
Clearly I'm missing something simple. :)
Any advice would be greatly appreciated.
-Sean
Le 10/11/2010 16:52, Sean Laurent a écrit : > On Wed, Nov 10, 2010 at 9:02 AM, Guillaume Lelarge > <guillaume@lelarge.info>wrote: > >> Le 09/11/2010 01:11, Sean Laurent a écrit : >>> Is there an issue way to view the possible enum values for a custom type >> in >>> PGAdmin3? Or is my only real option to run a query like: >>> >>> select enum_range(null::MyCustomTypeT) >>> >> >> You should see them in the type properties and in the type dialog >> properties. >> >> > Okay. A couple really really dumb questions. With v1.12.1, where do I find > type properties? And how do I access the type dialog properties? When I look > at a specific table, I can see the custom type listed on the dependencies > tab, but I can't do anything with. Obviously I can see it listed as the data > type for a column that uses the custom type, but again, I can't do anything > with the custom type. And I don't see custom types listed under any of the > catalogs or schemas. > > Clearly I'm missing something simple. :) > In the browser, you should have a "Types" node at the same level than the "Tables" one. Like in this screenshot: http://www.pgadmin.org/docs/1.12/images/main.png If you don't see it, you probably need to go to "File/Options" menu item, then select "Browser" tab (http://www.pgadmin.org/docs/1.12/options-tab3.html), and click on the "Types" checkbox in the list to check it. Once this is done, you'll probably need to disconnect from the server, and then reconnect, to make the new node visible. Click on the "Types" node, which should give you a list of all your user types on this database. Right click on your enum type, and select properties. The second tab should contain the list of enum values. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
On Wed, Nov 10, 2010 at 10:12 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 10/11/2010 16:52, Sean Laurent a écrit :In the browser, you should have a "Types" node at the same level than> On Wed, Nov 10, 2010 at 9:02 AM, Guillaume Lelarge
> <guillaume@lelarge.info>wrote:
>> Le 09/11/2010 01:11, Sean Laurent a écrit :
>>> Is there an issue way to view the possible enum values for a custom type
>>
>> You should see them in the type properties and in the type dialog
>> properties.
>>
> Okay. A couple really really dumb questions. With v1.12.1, where do I find
> type properties? And how do I access the type dialog properties?
> Clearly I'm missing something simple. :)
>
the "Tables" one. Like in this screenshot:
http://www.pgadmin.org/docs/1.12/images/main.png
If you don't see it, you probably need to go to "File/Options" menu
item, then select "Browser" tab
(http://www.pgadmin.org/docs/1.12/options-tab3.html), and click on the
"Types" checkbox in the list to check it. Once this is done, you'll
probably need to disconnect from the server, and then reconnect, to make
the new node visible.
Ah hah! That was the key detail I was missing! I have no idea how I missed the options dialog... *sigh*
Thanks for your assistance!
-Sean