catalogue
Background
Problem solving
Background
When you use the go PG framework to modify a column, an error occurs.
The column to be modified is bigint [] type. Keep trying, and multiple errors are reported as follows:
Missing “=” after array dimensions
ERROR #22P02 malformed array literal
Problem solving
Modify data directly:
update table_name set xxx= '{1,2}' where id=2;
This modification is successful. Is it right to contact the code and convert the value types to be injected?Yes, that’s it!
Code mode: set (“column =?”, Val)
Convert each value of Val of type [] Int64 into a string, and concatenate the string with commas: ` {% s}`
Expand to see: set (“column =?”, ` {1,2} ‘)
Done!
Read More:
- Split keyword in ABAP when the separator is at the beginning and end of the string
- [Python] numpy library array splicing np.concatenate Detailed explanation and examples of official documents
- Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column xxxx
- HTTP 400 error – bad request
- Typeerror: UFUNC ‘isn’t supported for the input types
- How to Fix TypeError: Cannot cast array data from dtype(‘float64‘) to dtype(‘<U32‘)….
- (element UI component table) how to add a style to a table
- DB: the solution of table already exist when migrating
- java.sql.SQLException: Incorrect string value:
- Set the default time to the current value in MySQL
- Definition of bracket type in typescript
- 12-web security — error injection based on SQL Server — and, convert, cast
- Array of PHP_ diff,array_ intersect,array_ merge, in_ Is there a limit on the number of arrays in array?
- [leetcode] zigzag transformation
- Numpy adds a new dimension: newaxis
- Two dimensional array and pointer to one dimensional array
- R note for Bioinfo: the column for the select call is undefined
- Lua — using remove to delete table data
- Array initializer is not allowed here
- SQL Union, union all usage and common errors and Solutions