Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres COPY command #104

Open
fdelbos opened this issue Mar 10, 2018 · 0 comments
Open

Postgres COPY command #104

fdelbos opened this issue Mar 10, 2018 · 0 comments

Comments

@fdelbos
Copy link

fdelbos commented Mar 10, 2018

Hi, I need to populate the database with some data and I since i can have thousands upon thousands of rows I use the copy statement like this:

-- +migrate Up

-- +migrate StatementBegin
COPY clients.business_types (id, label) FROM stdin delimiter ',';
ASS,Association
EARL,Entreprise agricole à responsabilité limitée
\.
-- +migrate StatementEnd

-- +migrate Down

but it failed with the following error :

postgres_1  | 2018-03-10 13:39:25.151 UTC [668] ERROR:  syntax error at or near "ASS" at character 68
postgres_1  | 2018-03-10 13:39:25.151 UTC [668] STATEMENT:
postgres_1  | 	COPY clients.business_types (id, label) FROM stdin delimiter ',';
postgres_1  | 	ASS,Association
postgres_1  | 	EARL,Entreprise agricole à responsabilité limitée
postgres_1  | 	\.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant