Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Jason Godden
> #define HEXVALUE(c) \ > (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \ >(((c) >= 'A' && (c) <= 'F') ? ((c) - 'A' + 10) : \ > ((c) - 'a' + 10))) > > 3. The third level would be to get rid of the assumption that letters > are contiguous, which would probably require making a lo

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Thu, 6 Nov 2003, Jason Godden wrote: >> On Thu, 6 Nov 2003 06:25 am, Markus Bertheau wrote: >>> +#define HEXVALUE(c) (((c)>='a') ? ((c)-87) : (((c)>='A') ? ((c)-55) : > ((c)-'0'))) > I haven't looked at the code in question, but assuming the digits ar

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Stephan Szabo
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 assum

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Kurt Roeckx
On Wed, Nov 05, 2003 at 02:47:17PM -0600, Larry Rosenman wrote: > > > --On Thursday, November 06, 2003 07:43:07 +1100 Jason Godden > <[EMAIL PROTECTED]> wrote: > > >On Thu, 6 Nov 2003 06:25 am, Markus Bertheau wrote: > >>? ???, 05.11.2003, ? 16:25, Tom Lane ?: > >>> > +#define HEXVALUE(c) (

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Larry Rosenman
--On Thursday, November 06, 2003 07:43:07 +1100 Jason Godden <[EMAIL PROTECTED]> 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 exces

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Jason Godden
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

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Markus Bertheau
Ð ÐÑÐ, 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 AS

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Tom Lane
Jason Godden <[EMAIL PROTECTED]> writes: > This is my first patch for PostgreSQL against the 7.5devel cvs (please > advise if this is the wrong place to post patches). pgsql-patches in future, please. > +#define HEXVALUE(c) (((c)>='a') ? ((c)-87) : (((c)>='A') ? ((c)-55) : ((c)-'0'))) This seems

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Christopher Kings-Lynne
This is my first patch for PostgreSQL against the 7.5devel cvs (please advise if this is the wrong place to post patches). This patch simply enables the \xDD (or \XDD) hexadecimal import in the copy command (im starting with the simple stuff first). I did notice that there may be a need to issue

Re: [HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Peter Eisentraut
Jason Godden writes: > This is my first patch for PostgreSQL against the 7.5devel cvs (please advise if > this is the wrong place to post patches). This patch simply enables the \xDD (or > \XDD) hexadecimal import in the copy command (im starting with the simple stuff > first). I did notice t

[HACKERS] \xDD patch for 7.5devel

2003-11-05 Thread Jason Godden
Hi all, This is my first patch for PostgreSQL against the 7.5devel cvs (please advise if this is the wrong place to post patches). This patch simply enables the \xDD (or \XDD) hexadecimal import in the copy command (im starting with the simple stuff first). I did notice that there may be a ne