From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet |
Date: | 2008-03-02 20:27:52 |
Message-ID: | 200803022027.m22KRqC03141@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> > "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> >> It might work to change struct varlena's contents to something like
> >>
> >> char vl_len_[4]; /* Do not touch this field directly! */
> >> char vl_dat[1];
>
> > Oh, that would probably fix this problem pretty well.
>
> > Touching vl_dat is only safe if you've either just allocated the object
> > yourself or you've already detoasted it.
>
> Sure, but that's been true ever since TOAST was first put in. The
> varvarlena patch didn't change that coding rule.
>
> I'll go try the char[4] hack and see if it works on the machines I have.
Tom has applied this change to CVS HEAD and 8.3.X.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-03-02 21:10:12 | Constructing array |
Previous Message | Tom Lane | 2008-03-02 16:52:56 | Re: newbie: renaming sequences task |