-----BEGIN PGP SIGNED MESSAGE-----
On Thu, Apr 17, 2008 at 1:16 AM, Tom Lane wrote:
> "Brendan Jurd" writes:
> >> If we don't want to meddle with xmltype/bytea/VarChar at all, we'll
> >> have to revert those changes, and I'll have to seriously scale back
> >> the cleanup patch I was about to post.
> > Still not sure where we stand on the above. To cast, or not to cast?
> I dunno. I know there was previously some handwaving about representing
> XML values in some more intelligent fashion than a plain text string,
> but I have no idea if anyone is likely to do anything about it in the
> foreseeable future.
Well ... if somebody does want to change the representation of xml
down the road, he's going to have to touch all the sites where the
code converts to and from cstring anyway, right?
So the only real difference this will make is that, instead of having
to replace four lines of VARDATA/memcpy per site, he'll have to
replace a single function call. That doesn't seem like a negative.
With that in mind, please find attached my followup patch. It cleans
up another 21 sites manually copying between cstring and varlena, for
a net reduction of 115 lines of code.
I didn't attempt to work through every reference to VARDATA, but I did
look at every hit from a `grep -Rn VARDATA . | grep memcpy`.
All regression tests passed (contrib tests included) on gentoo.
Patch added to commitfest queue.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
-----END PGP SIGNATURE-----
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2008-04-16 21:22:17|
|Subject: Re: Timely reporting of COPY errors |
|Previous:||From: Tom Lane||Date: 2008-04-16 21:03:39|
|Subject: Re: Lessons from commit fest |
pgsql-patches by date
|Next:||From: Alvaro Herrera||Date: 2008-04-16 21:27:46|
|Subject: Re: printTable API (was: Show INHERIT in \du)|
|Previous:||From: Joshua D. Drake||Date: 2008-04-16 18:21:51|
|Subject: Re: Patch for Prevent pg_dump/pg_restore from being
affected by statement_timeout|