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
While attempting to create a minimal reproducible state for issue #3673, I encountered an error related to a stack overflow when executing diesel migration run with COPY public."name" (id) FROM stdin;. In order to reproduce the issue, I copied the SQL code from my pg_dump and included it in the diesel migration script.
What are you trying to accomplish?
diesel migration run
What is the actual output?
Running migration user
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[1] 36976 IOT instruction (core dumped) diesel migration run
Steps to reproduce
docker pull postgres
docker run -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
echo'DATABASE_URL="postgresql://postgres:postgres@localhost:5432/db"'> .env
diesel setup
mkdir migrations/user
echo"CREATE TABLE public.\"user\" ( id integer NOT NULL);COPY public.\"user\" (id) FROM stdin;"> migrations/user/up.sql
diesel migration run
Related bug with COPY
When I include end of a COPY statement \. like in my pg_dump it gave me instead this error:
Running migration user
Failed to run user with: syntax error at or near "\"
End of data can be represented by a single line containing just backslash-period (\.).
An end-of-data marker is not necessary when reading from a file, since the end of file
serves perfectly well; it is needed only when copying data to or from client
applications using pre-3.0 client protocol.
Setup
Versions
cargo 1.70.0 (ec8a8a0ca 2023-04-25)
rustc 1.70.0 (90c541806 2023-05-31)
diesel 2.1.0
postgresql 15.3-1.pgdg120+1
ArcoLinux kernel 6.3.8-arch1-1
Feature Flags
Problem Description
While attempting to create a minimal reproducible state for issue #3673, I encountered an error related to a stack overflow when executing
diesel migration run
withCOPY public."name" (id) FROM stdin;
. In order to reproduce the issue, I copied the SQL code from my pg_dump and included it in the diesel migration script.What are you trying to accomplish?
diesel migration run
What is the actual output?
Steps to reproduce
Related bug with COPY
When I include end of a COPY statement
\.
like in my pg_dump it gave me instead this error:postgres copy docs
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: