Hash: SHA1

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.

Version: GnuPG v1.4.7 (GNU/Linux)
Comment: http://getfiregpg.org


Attachment: text-cstring-followup.diff.bz2
Description: BZip2 compressed data

Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:

Reply via email to