SOCI / soci

Official repository of the SOCI - The C++ Database Access Library
http://soci.sourceforge.net/
Boost Software License 1.0
1.41k stars 477 forks source link

Postgresql insert json string #1019

Closed shiausan closed 1 year ago

shiausan commented 1 year ago

Hi when c++ executed below select count(*) from sp_status_write('[{"begin":"2022-11-27T13:45:40","end":"2022-11-27T13:45:40","loop":"0:1:0","number":100,"prizes":[],"property":1}]'); but db shows "[{""begin"":""2022-11-27T13$1:40"",""end"":""2022-11-27T13$2:40"",""loop"":""0$3:0"",""number"":100,""prizes"":[],""property"":1}]"

but it is correct result if execute sp_status_write procedure from pgAdmin4 tool

thanks

vadz commented 1 year ago

Sorry, what is sp_status_write? Also, have you tried the data as a bound variable?

shiausan commented 1 year ago

sp_status_write is a stored procedure and i tried the data as a bound variable which is working fine now

thanks a lot

VZ @.***> 於 2022年11月20日 週日 晚上10:02寫道:

Sorry, what is sp_status_write? Also, have you tried the data as a bound variable?

— Reply to this email directly, view it on GitHub https://github.com/SOCI/soci/issues/1019#issuecomment-1321141240, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHFMJ627S4D55PGVYA7AZ3WJIVONANCNFSM6AAAAAASFV3IGQ . You are receiving this because you authored the thread.Message ID: @.***>