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
What version of GraphJin are you using? graphjin version
v0.21.9 (Go binary install)
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
16GB, Fedora 37
Steps to reproduce the issue (config used to run GraphJin).
Add following to 0_init.sql
CREATE TYPE employee_type AS ENUM ('Contract', 'Permenant');
CREATE TABLE employees (
id SERIAL,
eid VARCHAR(10) PRIMARY KEY,
e_type employee_type NOT NULL,
e_name VARCHAR(100) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
);
Create employees.csv in current directory
eid,e_type,e_name,e_gender
'00008,Contract,John
Add following line to seed.js
import_csv("employees", "employees.csv");
Expected behaviour and actual result.
❯ docker-compose run api db setup
FATAL Error with copy-from: ERROR: COPY from stdin failed: unable to encode "Contract" into binary format for unknown type (OID 16394): cannot find encode plan (SQLSTATE 57014) (line no 2)
Notes
This seems to coming from this line probably a bug in an external dependency,
current solution is to avoid enum custom types and using check constraints.
The text was updated successfully, but these errors were encountered:
kaushalyap
changed the title
FATAL Error with copy-from: ERROR: COPY from stdin failed: unable to encode "admin" into binary format for unknown type (OID 16492): cannot find encode plan (SQLSTATE 57014) (line no 2)
FATAL Error with copy-from: ERROR: COPY from stdin failed: unable to encode "Contract" into binary format for unknown type (OID 16492): cannot find encode plan (SQLSTATE 57014) (line no 2)
Dec 6, 2022
dosco
changed the title
FATAL Error with copy-from: ERROR: COPY from stdin failed: unable to encode "Contract" into binary format for unknown type (OID 16492): cannot find encode plan (SQLSTATE 57014) (line no 2)
COPY command fails on tables with enum columns
Dec 15, 2022
What version of GraphJin are you using?
graphjin version
v0.21.9 (Go binary install)
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
16GB, Fedora 37
Steps to reproduce the issue (config used to run GraphJin).
employees.csv
in current directoryseed.js
import_csv("employees", "employees.csv");
Expected behaviour and actual result.
❯ docker-compose run api db setup
Notes
This seems to coming from this line probably a bug in an external dependency,
current solution is to avoid enum custom types and using check constraints.
The text was updated successfully, but these errors were encountered: