Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5826cf6

Browse files
deanrasheedpull[bot]
authored andcommitted
Ensure that numeric.c compiles with other NBASE values.
As noted in the comments, support for different NBASE values is reallyonly of historical interest, but as long as we're keeping it, we mightas well make sure that it compiles.Joel JacobsonDiscussion:https://postgr.es/m/06712c29-98e9-43b3-98da-f234d81c6e49%40app.fastmail.com
1 parent7790e2f commit5826cf6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/backend/utils/adt/numeric.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4245,7 +4245,15 @@ int64_div_fast_to_numeric(int64 val1, int log10val2)
42454245
*/
42464246
if (m>0)
42474247
{
4248+
#ifDEC_DIGITS==4
42484249
staticintpow10[]= {1,10,100,1000};
4250+
#elifDEC_DIGITS==2
4251+
staticintpow10[]= {1,10};
4252+
#elifDEC_DIGITS==1
4253+
staticintpow10[]= {1};
4254+
#else
4255+
#error unsupported NBASE
4256+
#endif
42494257

42504258
StaticAssertDecl(lengthof(pow10)==DEC_DIGITS,"mismatch with DEC_DIGITS");
42514259

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp