Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.
Date
Msg-id 18980.1483022888@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Assignment of valid collation for SET operations onqueries with UNKNOWN types.  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: [HACKERS] Assignment of valid collation for SET operations onqueries with UNKNOWN types.  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> The way this patch has been written, it doesn't allow creating tables
> with unknown type columns, which was allowed earlier.

Yes, that's an intentional change; creating such tables (or views) has
never been anything but a foot-gun.

However, I thought the idea was to silently coerce affected columns from
unknown to text.  This doesn't look like the behavior we want:

> You might want to add some testcases to test the error report e.g.
> (not necessarily in the same form) create view sv as select
> relname::unknown from pg_class;
> ERROR:  column "relname" has type "unknown"
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Indirect indexes
Next
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] Improving RLS planning