From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3598: Strange behaviour of character columns in select with views |
Date: | 2007-09-06 17:41:54 |
Message-ID: | 29142.1189100514@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Luiz K. Matsumura" <luiz(at)planit(dot)com(dot)br> 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(3)" is simplified to a bare Const
expression node, the length knowledge is lost because there is no place
to store typmod in pre-8.3 Const nodes. The peculiar-seeming dependence
on the form of the query is because the behavior depends on exactly
which version of the select list (before or after const simplification)
is looked at to generate the typmod value that ultimately gets sent to
the client.
While it might be possible to find a hack that improves the behavior for
specific cases in 8.2 (by changing around when we look at what), the
fundamental lack of the needed field in Const nodes is unfixable without
forcing initdb, which we won't do in released branches. So I'm not
excited about looking for a band-aid answer for 8.2 or 8.1.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-09-06 18:20:40 | Re: create index concurrently blocks on transactions in other databases |
Previous Message | Jayaram R | 2007-09-06 13:24:42 | BUG #3603: ADO PostgreSQL OLE DB Provider ERROR |