Re: [HACKERS] Text <-> C string

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Text <-> C string
Date: 2008-04-16 06:52:22
Message-ID: 37ed240d0804152352r17d74dc7n33cb966291c08a3f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Mar 29, 2008 at 5:40 AM, Brendan Jurd wrote:
> On 29/03/2008, Tom Lane wrote:
> > I intentionally didn't touch xml.c, nor anyplace that is not dealing
> > in text, even if it happens to be binary-compatible with text.
> >
>
> Hmm, okay. My original submission did include a few such changes; for
> example, in xml_in and xml_out_internal I saw that the conversion
> between xmltype and cstring was identical to the text conversion, so I
> went ahead and used the text functions. Feedback upthread suggested
> that it was okay to go ahead with casting in identical cases. [1]
>
> I saw that these changes made it into the commit, so I assumed that it
> was the right call.
>
> 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?

Cheers,
BJ
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: http://getfiregpg.org

iD8DBQFIBaFy5YBsbHkuyV0RAsMmAKDHaEb7aMudKJgVxcf5RRcOtAJ+bwCgivLI
5B3xJze46NGWjEyOpq/TSaY=
=BObd
- -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: http://getfiregpg.org

iD8DBQFIBaIl5YBsbHkuyV0RArDDAJ0QThLXAhzy+NX+2YsF+q4z/sIy1QCeJPiW
s/rVns3FFQVP5g9DTOshDfQ=
=4Tdh
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2008-04-16 07:37:25 Re: WIP: Pg_upgrade - page layout converter (PLC) hook
Previous Message tomas 2008-04-16 06:48:54 Re: pulling libpqtypes from queue

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2008-04-16 10:07:09 Re: Improve shutdown during online backup
Previous Message ITAGAKI Takahiro 2008-04-16 04:22:13 Re: Sorting writes during checkpoint