From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: current is broken |
Date: | 2000-09-14 22:40:57 |
Message-ID: | 20000914174057.A12024@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-09-14 23:11:51 | Re: Status of new relation file naming |
Previous Message | Mikheev, Vadim | 2000-09-14 17:17:56 | RE: strange behaviour (bug) |