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

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 (view raw or flat)
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

pgsql-bugs by date

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

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