From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: numeric access out of bounds |
Date: | 2015-01-27 17:08:25 |
Message-ID: | 20402.1422378505@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
>> I can see two possible fixes: one to correct the assumptions in the
>> macros, the other to check for NaN before calling init_var_from_num in
>> numeric_send (all the other functions seem to do this check explicitly).
>> Which would be preferable?
> I'm inclined to think special-casing NaN in numeric_send is the thing to
> do, since it is that way everywhere else. If we could push down all the
> special casing into init_var_from_num then that would probably be better,
> but in most cases that looks unattractive.
After taking a closer look I realized that you were right with your first
alternative: the field access macros are just plain wrong, and we should
fix 'em. Done now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-01-27 17:23:41 | Re: jsonb, unicode escapes and escaped backslashes |
Previous Message | Andrew Dunstan | 2015-01-27 16:43:42 | Re: jsonb, unicode escapes and escaped backslashes |