pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver

pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver

pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver

pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver

pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver

pgsql: Fix corner case bug in numeric to_char() some more.

2023-03-14 Thread Tom Lane
Fix corner case bug in numeric to_char() some more. The band-aid applied in commit f0bedf3e4 turns out to still need some work: it made sure we didn't set Np->last_relevant too small (to the left of the decimal point), but it didn't prevent setting it too large (off the end of the partially-conver