From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
Cc: | "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3598: Strange behaviour of character columns in select with views |
Date: | 2007-09-04 15:47:20 |
Message-ID: | 25814.1188920840@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> 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 report either the correct
typmod or -1, just as he says. You can see the difference on the
backend side by looking at the top-level targetentries in EXPLAIN
VERBOSE, so it is a backend problem and not client-side. My theory at
the moment is that there's something whacko about the planner's "use
physical tlist" optimization that's applied when it doesn't need to do
any projection (ie no computations or column rearrangements). That code
works fine in simpler cases but there's something about this view that
confuses it. Haven't dug into it in detail yet.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Phillip Carruthers | 2007-09-04 16:13:31 | BUG #3600: ODBC Driver not working with BIGINT |
Previous Message | Tom Lane | 2007-09-04 15:18:40 | Re: BUG #3597: CREATE OR REPLACE VIEW |