On Wed, Sep 13, 2000 at 03:44:25PM +1000, Philip Warner wrote:
> At 13:07 13/09/00 +0900, Tatsuo Ishii wrote:
> >It seems current source is broken if MB is enabled.
Gah, I Was afraid of this. My patch, I'm afraid.
> >
>
> I haven't looked at the code yet, but isViewRule is going to change to use
> the new reltype for views. Maybe this will side-step the problem?
>
Yes, it should. However, I've just done a quick test in a non-MB compile, and
it looks like char(n) = 'a string constant' returns true if the first n chars
match. If this is correct behavior, and holds in the multibyte case, then
you can strip out _all_ the rulename truncation from pg_dump.
Here's the example:
I've got a view named: " this_is_a_really_really_long_vi", with matching rule:
"_RETthis_is_a_really_really_lon"
Without truncation, pgdump generates (with addition of relname for
readability) this query (hand wrapped)
reedstrm=# select relname,rulename from pg_class, pg_rewrite where pg_class.oid = ev_class and
pg_rewrite.ev_type= '1' and rulename = '_RETthis_is_a_really_really_long_vi';
relname | rulename
---------------------------------+---------------------------------this_is_a_really_really_long_vi |
_RETthis_is_a_really_really_lon
(1 row)
reedstrm=#
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005