db2rest
db2rest copied to clipboard
ERROR: trailing junk after numeric literal at or near "0H" Position: 154
The following query
SELECT t_re_33."id" ,t_re_33."name" ,t_re_33."display_name" ,t_re_33."deleted" ,t_re_33."display_order" ,t_re_33."storage_provider_id" FROM 0HEM8B0GQNB5M.t_region t_re_33
Leads to error Caused by: org.postgresql.util.PSQLException: ERROR: trailing junk after numeric literal at or near "0H" Position: 154
Solution : cover the schema name in quotes.
But I already said this: Best to always use quoted identifiers. See https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
- Quoted identifiers can contain any character except
char(0). - Maximum length of any
identifieris 63 characters. - And escaping, well for PostgreSQL, it ends up being entirely dependent on what the admin has configured the server encoding to (UTF-8, or not, etc.)
SELECT "t_re_33"."id",
"t_re_33"."name",
"t_re_33"."display_name",
"t_re_33"."deleted",
"t_re_33"."display_order",
"t_re_33"."storage_provider_id"
FROM "0HEM8B0GQNB5M"."t_region" "t_re_33";
Yes this was not done for schema and table name.
On Fri, Oct 4, 2024, 8:00 PM Thad Guidry @.***> wrote:
SELECT "t_re_33"."id", "t_re_33"."name", "t_re_33"."display_name", "t_re_33"."deleted", "t_re_33"."display_order", "t_re_33"."storage_provider_id"FROM "0HEM8B0GQNB5M"."t_region" "t_re_33";
— Reply to this email directly, view it on GitHub https://github.com/9tigerio/db2rest/issues/727#issuecomment-2394838816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAISPRE5PIVAFMJKWF3AGIDZZ42ZHAVCNFSM6AAAAABPM2GJZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUHAZTQOBRGY . You are receiving this because you authored the thread.Message ID: @.***>