cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

sql: support COPY ... (ENCODING ...)

Open rafiss opened this issue 3 years ago • 12 comments

Support the ENCODING option for COPY.

This specifies how the file is encoded. In CRDB, we can only can support 'utf8', so if someone specifies a different encoding, the command should return an error.

https://www.postgresql.org/docs/current/sql-copy.html

See https://github.com/cockroachdb/cockroach/pull/59790 for an example of how to add an option.

Epic CRDB-18320

Jira issue: CRDB-33390

rafiss avatar Nov 09 '23 22:11 rafiss

Hi! Can I take it?

moohbr avatar Nov 24 '23 13:11 moohbr

@rafiss

moohbr avatar Nov 24 '23 19:11 moohbr

sure, feel free to submit a PR. see these guidelines: https://cockroachlabs.atlassian.net/wiki/spaces/CRDB/pages/73072641

rafiss avatar Nov 25 '23 17:11 rafiss

Adding this issue related to encoding. https://github.com/cockroachdb/cockroach/issues/35882 This seems a bit different though as this is between files and tables.

delphamk avatar Dec 15 '23 23:12 delphamk

@moohbr Are you still working on it?

jerinthomas1404 avatar Dec 31 '23 18:12 jerinthomas1404

@rafiss Can I take up this issue?

jerinthomas1404 avatar Dec 31 '23 18:12 jerinthomas1404

sure, feel free to submit a PR! see these guidelines: https://cockroachlabs.atlassian.net/wiki/spaces/CRDB/pages/73072641

rafiss avatar Dec 31 '23 18:12 rafiss

@jerinthomas1404 are you already working on this one?

lpessoa avatar Jan 03 '24 20:01 lpessoa

@lpessoa I haven't started

mendaxjerin avatar Jan 04 '24 04:01 mendaxjerin

@lpessoa , @mendaxjerin , @jerinthomas1404 , Has this task been started?

delphamk avatar Jan 04 '24 13:01 delphamk

@lpessoa , @mendaxjerin , @jerinthomas1404 , Has this task been started?

I have already started on some code. Already implemented the changes in the grammar file and in the copy_from and copy (followed the sample provided by @rafiss )

Gonna look at tests next

lpessoa avatar Jan 04 '24 13:01 lpessoa

You can complete it. I'll take up something else

mendaxjerin avatar Jan 04 '24 13:01 mendaxjerin