Re: Does mbutils.c really need to use L'\0' ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Does mbutils.c really need to use L'\0' ?
Date
Msg-id 18597.1278455019@sss.pgh.pa.us
Whole thread Raw
In response to Re: Does mbutils.c really need to use L'\0' ?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Does mbutils.c really need to use L'\0' ?
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> I'm dubious that it's worth the trouble.  I suggest that it might be
>> best to replace these usages of L'\0' by plain scalar 0.  Does anyone
>> think that wouldn't work or is too grotty?

> or maybe 0x0000, which I gather from 
> <http://en.wikipedia.org/wiki/Wide_character> is the usual locution.

Hm.  I don't really read that page as suggesting that 0x0000 is what to
use if your compiler hasn't got wide chars.  I'd tend to go with just 0,
which is a reasonably common substitute for non-wide '\0' ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add note that using PL/Python 2 and 3 in the same session will
Next
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Fix log_temp_files docs and comments to say bytes not kilobytes.