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

Re: unclear enum error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unclear enum error messages
Date: 2007-11-28 16:01:26
Message-ID: 772.1196265686@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> There are a few error messages like this in the code:
>         /*
>          * We rely on being able to get the specific enum type from the calling
>          * expression tree.  The generic type mechanism should have ensured that
>          * both are of the same type.
>          */
>         enumtypoid = get_fn_expr_argtype(fcinfo->flinfo, 0);
>         if (enumtypoid == InvalidOid)
>                 ereport(ERROR,
>                                 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
>                                  errmsg("could not determine actual enum type")));

> First, isn't this an internal error?

Not necessarily; there are many code paths by which a function could get
called without argument-type info.  Thus the FEATURE_NOT_SUPPORTED
classification.

> What is an actual enum type?  And how should a user react if he got this
> message?  I would ask, "why not?".

Yeah, I would too, but without a concrete example to look at it's hard
to say if the situation could be improved.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2007-11-28 16:19:54
Subject: Re: String encoding during connection "handshake"
Previous:From: Rudolf van der LeedenDate: 2007-11-28 15:59:52
Subject: Re: PG 8.3beta3 Segmentation Fault during Database Restore

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