I. Problem description
This error was reported during the query operation, and by analysis, it was not an SQL statement syntax error, if it was an SQL statement syntax error, which row would be reported as a problem, it was a query with a PostgreSQL data type error, a non-Bigint data type, and a value of 1.0 saved in the database. Query as a bigint type. SQL example:
This error was reported during the query operation, and by analysis, it was not an SQL statement syntax error, if it was an SQL statement syntax error, which row would be reported as a problem, it was a query with a PostgreSQL data type error, a non-Bigint data type, and a value of 1.0 saved in the database. Query as a bigint type. SQL example:
select (
ext ->> 'weekly_outpatient_days'
) :: BIGINT AS weekly_outpatient_days from test
Ii. Solutions
Get the question SQL, see which fields are designated as Bigint, then change it to something else, which I call numeric, and that’s fine.
select (
ext ->> 'weekly_outpatient_days'
) :: numeric AS weekly_outpatient_days from test
Third, summary
The problem arises because of a lack of understanding of PostgreSQL data types.
1. The number types are as follows
2. The string type is as follows:
3. Generally, Integer or Bigint is used as the type, while numeric is used for the high-precision type and text is used for the string type. Please refer to the form for the specific refinement. If helpful, welcome to focus on Java basic notes public account.
Read More:
- [!] Invalid `Podfile` file: syntax error, unexpected end-of-input, expecting keyword_end.
- Solve the problem of syntax error: invalid syntax in PIP install XXX
- Syntax error: invalid syntax before Python string
- Syntax error: invalid syntax
- [Python] error syntax error: summary of solutions to invalid syntax
- Error syntax error: invalid syntax in PIP install XXX
- Error in PIP command execution – syntax error: invalid syntax
- Repo reports an error syntax error: invalid syntax
- Python: print syntax error: problem with invalid syntax error
- Invalid DN syntax (34)
- [Solved] Failed to set attribute: Invalid input data or parameter
- LDAP: error code 21 – objectclass: value ා 0 invalid per syntax
- Solution to syntaxerror: invalid syntax in PIP install XXX
- File “manage.py“, line 17 ) from exc ^ SyntaxError: invalid syntax
- Exception occurred when Django created app: from exc ^ syntaxerror: invalid syntax
- Syntax error: invalid character in identifier
- Syntaxerror: invalid syntax when executing PIP install XXX
- Vue element El input search to achieve anti shake @ input event requests frequently
- How to restrict input field to only input pure numbers in HTML