osdldbt / dbt5

Database Test 5: Fair Use TPC Benchmark(TM) E
Artistic License 2.0
1 stars 10 forks source link

fix(storedfunc/c): consistent type for comm_amount #17

Closed ksyx closed 4 months ago

ksyx commented 4 months ago

Fixes #15.

As of commit 5575431ad9826c532a466191239338c635002b0f, there is only this single occurrence of FLOAT4OID and all others uses FLOAT8OID, and comm_amount is defined as double type in trade_result.c:1654 and converted using GetFloat8 in lines 1667 and 1668 of the same file. The following error is no longer raised after this fix:

ERROR:  numeric field overflow
DETAIL:  A field with precision 10, scale 2 must round to an absolute value less than 10^8. CONTEXT:  SQL statement "UPDATE trade
SET t_comm = $1
  , t_dts = $2
  , t_st_id = $3
  , t_trade_price = $4
WHERE t_id = $5"
markwkm commented 4 months ago

Merged with minor commit message and ChangeLog edit. f240d86c810587035590ff48a4e8f3f0082dbe1b