Re: [BUGS] BUG #3598: Strange behaviour of character columns in select with views

2007-09-06 Thread Tom Lane
"Luiz K. Matsumura" <[EMAIL PROTECTED]> writes: > Description:Strange behaviour of character columns in select with > views I've applied a fix for this in CVS HEAD (8.3-to-be), but it seems impractical to fix it in 8.2 (or 8.1 which also has the issue). The problem is that when "null::char

Re: [BUGS] BUG #3598: Strange behaviour of character columns in select with views

2007-09-04 Thread Luiz K. Matsumura
Heikki Linnakangas wrote: Luiz K. Matsumura wrote: When we do: SELECT * from view1; OR SELECT id,col1,type1,type2 FROM view1; column type1 return as bpchar But if we do: SELECT type1 FROM view1; or SELECT id,col1,type2,type1 FROM view1; Now, type1 return as character(3) as expected.

Re: [BUGS] BUG #3598: Strange behaviour of character columns in select with views

2007-09-04 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > I can't reproduce this. View1.type1 has has type char(3) as expected in > both cases, as witnessed by "CREATE VIEW f AS SELECT */type1 FROM > view1"; \d f". How did you determine the data types? I just did reproduce it: libpq's PQfmod() does repor

Re: [BUGS] BUG #3598: Strange behaviour of character columns in select with views

2007-09-04 Thread Heikki Linnakangas
Luiz K. Matsumura wrote: > When we do: > > SELECT * from view1; > OR > SELECT id,col1,type1,type2 FROM view1; > > column type1 return as bpchar > > > But if we do: > SELECT type1 FROM view1; > or > SELECT id,col1,type2,type1 FROM view1; > > Now, type1 return as character(3) as expected. I can