Thread: BUG #5836: Enum Support Functions don't work on empty tables

BUG #5836: Enum Support Functions don't work on empty tables

From
"David Pinheiro"
Date:
The following bug has been logged online:

Bug reference:      5836
Logged by:          David Pinheiro
Email address:      davidsantospinheiro@gmail.com
PostgreSQL version: 8.4
Operating system:   Centos
Description:        Enum Support Functions don't work on empty tables
Details:

The functions referred on Table 9-29 in
http://www.postgresql.org/docs/9.0/static/functions-enum.html don't work on
empty tables.

Example: If you have an empty table and you query:
SELECT enum_range("enum_table_column") from "table_name";
postgres returns an empty result.
If the table has some element, the query works ok.

Re: BUG #5836: Enum Support Functions don't work on empty tables

From
Tom Lane
Date:
"David Pinheiro" <davidsantospinheiro@gmail.com> writes:
> Example: If you have an empty table and you query:
> SELECT enum_range("enum_table_column") from "table_name";
> postgres returns an empty result.

That doesn't seem like a bug.  No rows in, no rows out.

            regards, tom lane