Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/159.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何在pgsql中格式化数组参数?_C++_Arrays_Postgresql - Fatal编程技术网

C++ 如何在pgsql中格式化数组参数?

C++ 如何在pgsql中格式化数组参数?,c++,arrays,postgresql,C++,Arrays,Postgresql,我将c中的一个字符串作为“{1,2,3,4,5}”传递,并尝试使用它将表中的数组int[]记录更新为格式(“更新表集数组=%s,其中***”,字符串) 但是,我得到了错误 "lastError = 0x009f0bda "ERROR: column "houses_list" is of type integer[] but expression is of type text" “lastError=0x009f0bda”错误:“houses_list”列的类型为integer[],但表达式

我将c中的一个字符串作为“{1,2,3,4,5}”传递,并尝试使用它将表中的数组int[]记录更新为
格式(“更新表集数组=%s,其中***”,字符串)

但是,我得到了错误

"lastError = 0x009f0bda "ERROR: column "houses_list" is of type integer[] but expression is of type text" “lastError=0x009f0bda”错误:“houses_list”列的类型为integer[],但表达式的类型为text”
请在pgsql、tks中提供更新数组使用字符串的正确格式。您可以尝试
'{1,2,3,4,5}'::int[]
数组[1,2,3,4,5]