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

CopyFrom CSV support options like HEADER and DELIMITER #105

Open
denissun opened this issue Feb 28, 2022 · 1 comment
Open

CopyFrom CSV support options like HEADER and DELIMITER #105

denissun opened this issue Feb 28, 2022 · 1 comment

Comments

@denissun
Copy link

I tried for example the following not working

res, err := dbconn.PgConn().CopyFrom(context.Background(), f, "COPY foo FROM STDIN (FORMAT csv HEADER)")

res, err := dbconn.PgConn().CopyFrom(context.Background(), f, "COPY foo FROM STDIN (FORMAT csv) HEADER")

@jackc
Copy link
Owner

jackc commented Mar 2, 2022

pgconn doesn't really have anything to do with those options. It just executes the SQL string and copies the data from the io.Reader to the remote server. There must be some other problem.

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

2 participants