Re: Assignment of valid collation for SET operations on queries with UNKNOWN types.
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-01-04T04:30:36Z
Lists: pgsql-hackers
On Tue, Jan 3, 2017 at 5:57 PM, Rahila Syed <rahilasyed90@gmail.com> wrote: > Thank you all for inputs. > Kindly help me clarify the scope of the patch. > >>However, I thought the idea was to silently coerce affected columns from >>unknown to text. This doesn't look like the behavior we want: > > This patch prevents creation of relation with unknown columns and > in addition fixes the particular case of CREATE VIEW with literal columns > by coercing unknown to text only in this particular case. > > Are you suggesting extending the patch to include coercing from unknown to > text for all possible cases where a column of unknown type is being created? > I guess, that's what Tom is suggesting. We need to do something to avoid throwing an error in the cases which do not throw error in earlier releases. We may just leave that warning as warning for now, and just tackle the view case in this patch. I would like everything being done in one patch, rather than this piece-meal approach. But delaying fix for views because it takes longer to work on other pieces may not be good either. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
Commits
-
Remove vestigial resolveUnknown arguments from transformSortClause etc.
- aebeb4790c75 10.0 landed
-
Make UNKNOWN into an actual pseudo-type.
- d8d32d9a56a3 10.0 landed
-
Change unknown-type literals to type text in SELECT and RETURNING lists.
- 1e7c4bb00497 10.0 landed