Skip site navigation (1) Skip section navigation (2)

Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?

From: "Nagle, Gail A \(US SSA\)" <gail(dot)nagle(at)baesystems(dot)com>
To: "Anders Larsen" <Anders(dot)Larsen(at)framestore(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?
Date: 2008-12-19 01:00:08
Message-ID: 7b4c32$1n2q38@dmzms99801.na.baesystems.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hello Larsen,

Thank you! This displays the values as an array of strings.

Enum is a better search string in the manual than enumerate(d) or
enumeration.

Best regards,
-Gail

-----Original Message-----
From: Anders Larsen [mailto:Anders(dot)Larsen(at)framestore(dot)com] 
Sent: Thursday, December 18, 2008 3:01 AM
To: Nagle, Gail A (US SSA)
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Is it possible to query the database for the
values of an enumerated type in 8.3.3?

Nagle, Gail A (US SSA) wrote:
> 
> Is it possible to query the database (e.g. from psql or from the
pgAdmin 
> III Query tool) for the enumerated values in the newly added user 
> defined type?
> 

Try this query:
select enum_range(null::some_type_name);

More information can be found here:
http://www.postgresql.org/docs/8.3/static/functions-enum.html



pgsql-novice by date

Next:From: Bruce HyattDate: 2008-12-20 03:18:26
Subject: Fw: Re: Fw: Re: connection refused
Previous:From: Nagle, Gail A (US SSA)Date: 2008-12-19 00:58:35
Subject: Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group