lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
9.04k stars 909 forks source link

How to set the schema for the CopyIn? #1092

Open zhanghaiyang9999 opened 1 year ago

zhanghaiyang9999 commented 1 year ago

From the CopyIn example, like this: pq.CopyIn("tablename","column1","column2"...

But if the tablename is not in public schema, how to set the schema name, for example, the schema is test, can use the code like these?

pq.CopyIn("test.tablename","column1","column2"...

rkolp commented 1 year ago

pq.CopyInSchema("<schema>", "<table>", "column1")