You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run the query through the py-postgresql library and the library is not handling the timestamp parameter
"could not pack parameter $4::TIMESTAMP WITHOUT TIME ZONE for transfer"
INSERT INTO public.example
(ordering, state, checked_out, checked_out_time, created_by, modified_by, name, cep, cpf, cnpj, birth_day, hora_cadastro, email, username, phone_number, website, client_type, user_id, data_bloqueio, user2_id, description)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21)
could not pack parameter $4::TIMESTAMP WITHOUT TIME ZONE for transfer
[
1,
1,
1,
"2018-01-01 01:01:01",
1,
1,
...
1,
1,
"2018-02-22 10:10:00",
1,
"descri\u00e7\u00e3o do item"
]
The text was updated successfully, but these errors were encountered:
I imagine the timestamp was being passed as a builtins.str object. Another alternative would be to cast the parameter as TEXT and then as a TIMESTAMP. This is a feature of the driver providing conversions from Python types to Postgres types(and the reverse). A common means to circumvent the feature is to cast a parameter or column as TEXT.
I'm trying to run the query through the py-postgresql library and the library is not handling the timestamp parameter
"could not pack parameter $4::TIMESTAMP WITHOUT TIME ZONE for transfer"
INSERT INTO public.example
(ordering, state, checked_out, checked_out_time, created_by, modified_by, name, cep, cpf, cnpj, birth_day, hora_cadastro, email, username, phone_number, website, client_type, user_id, data_bloqueio, user2_id, description)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21)
could not pack parameter $4::TIMESTAMP WITHOUT TIME ZONE for transfer
[
1,
1,
1,
"2018-01-01 01:01:01",
1,
1,
...
1,
1,
"2018-02-22 10:10:00",
1,
"descri\u00e7\u00e3o do item"
]
The text was updated successfully, but these errors were encountered: