From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Jason Godden <jasongodden(at)optushome(dot)com(dot)au> |
Cc: | Markus Bertheau <twanger(at)bluetwanger(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: \xDD patch for 7.5devel |
Date: | 2003-11-05 21:25:58 |
Message-ID: | 20031105132359.L12206@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 6 Nov 2003, Jason Godden wrote:
> On Thu, 6 Nov 2003 06:25 am, Markus Bertheau wrote:
> > В Срд, 05.11.2003, в 16:25, Tom Lane пишет:
> > > > +#define HEXVALUE(c) (((c)>='a') ? ((c)-87) : (((c)>='A') ? ((c)-55) :
> > > > ((c)-'0')))
> > >
> > > This seems excessively dependent on the assumption that the character
> > > set is ASCII. Why have you hard-coded numeric equivalents into this
> > > macro?
> >
> > What not ASCII compatible character sets are out there in use still
> > today?
>
> Ah, yes - didn't even think about the character sets. If thats the case then
> octal needs attention as well because it makes a similar assumption. Peter
I haven't looked at the code in question, but assuming the digits are
contiguous and in order is safe, the C spec mandates that. Assuming that
the letters are in order and contiguous is not safe.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-05 21:29:50 | Re: Performance features the 4th |
Previous Message | Marc G. Fournier | 2003-11-05 21:20:06 | Re: Schema boggle... |