Re: Assignment of valid collation for SET operations on queries with UNKNOWN types.
Rahila Syed <rahilasyed90@gmail.com>
From: Rahila Syed <rahilasyed90@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-12-14T10:02:34Z
Lists: pgsql-hackers
Attachments
- unknown_view_column_to_text_v1.patch (application/x-download) patch v1
Hello, Thank you for comments. >There is a similar code pattern for materialized views, see >create_ctas_nodata() where the attribute list is built create_ctas_nodata() is for creation of materialized views WITH NO DATA. For other materialized views and CREATE TABLE AS, column definitions are built in intorel_startup() function which has different code from that of CREATE VIEW which the patch deals with. Limiting the scope of the patch to include changing the type of literal constants to text only for plain views. Also, error out when column with UNKNOWN type is being created for other relations like tables and materialized views. >And actually, shouldn't this be just a plain error? Changed it to error in the attached patch. >Your patch has no regression tests, surely you want some to stress >this code path Added regression tests in the attached patch. Also adding this patch to CF 2017-01 Thank you, Rahila Syed
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