Re: BUG #4182: Enum in Foreign Key broken

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rod Taylor" <rod(dot)taylor(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4182: Enum in Foreign Key broken
Date: 2008-05-18 21:01:42
Message-ID: 9142.1211144502@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Rod Taylor" <rod(dot)taylor(at)gmail(dot)com> writes:
> The Update in the below script results in the following
> ERROR: no conversion function from some_enum to anyenum

This is coming from

if (pathtype != COERCION_PATH_FUNC &&
pathtype != COERCION_PATH_RELABELTYPE)
{
/* If target is ANYARRAY, assume it's OK, else punt. */
if (lefttype != ANYARRAYOID)
elog(ERROR, "no conversion function from %s to %s",
format_type_be(typeid),
format_type_be(lefttype));
}

I suspect this code needs to make an exception for ANYENUM as well, but
no time to look closely right now.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-05-19 03:02:16 Re: BUG #4180: PANIC while PQExec on Client with differen locale from database
Previous Message Tom Lane 2008-05-18 20:17:22 Re: BUG #4180: PANIC while PQExec on Client with differen locale from database