Re: [GENERAL] Field size become unlimited in union...

2016-05-03 Thread Tom Lane
"David G. Johnston" writes: > This seems to fail to answer the OPs question. Specifically, do these > rules automatically, or at least if #1 is not true, cause typemod > information to be lost? IOW, is it because of the unknown that both end up > up-casted to typemod-less text? Any mismatch of

Re: [GENERAL] Field size become unlimited in union...

2016-05-03 Thread David G. Johnston
On Tue, May 3, 2016 at 6:50 AM, Adrian Klaver wrote: > On 05/03/2016 04:28 AM, Durumdara wrote: > >> Hello! >> >> As I experienced, PGSQL changes the result field sizes to unlimited >> varchar, when I passed different field size in same column of the union. >> >> SP.Key - varchar(100) >> SP.Value

Re: [GENERAL] Field size become unlimited in union...

2016-05-03 Thread Adrian Klaver
On 05/03/2016 04:28 AM, Durumdara wrote: Hello! As I experienced, PGSQL changes the result field sizes to unlimited varchar, when I passed different field size in same column of the union. SP.Key - varchar(100) SP.Value - varchar(200) Example: select 'a', value from sp union all select

[GENERAL] Field size become unlimited in union...

2016-05-03 Thread Durumdara
Hello! As I experienced, PGSQL changes the result field sizes to unlimited varchar, when I passed different field size in same column of the union. SP.Key - varchar(100) SP.Value - varchar(200) Example: select 'a', value from sp union all select key, value from sp The first field is not