citusdata / citusdata/citus

`COPY FROM PROGRAM WITH (format result)` does not work

Open
#2,084 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

We assume that you're going to run `COPY FROM STDIN WITH (format result)` and act as if you typed that in:

```
brian=# COPY squares FROM PROGRAM 'echo 0 && echo 1 && echo 2' WITH (format result);
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself, or an EOF signal.
>>
```

We should either:
- Support `PROGRAM`
- Error out and tell you that we don't support `PROGRAM` (make the check [here](https://github.com/citusdata/citus/blob/952da72c55d6919d72efb93001aaa4fa29aa8758/src/backend/distributed/executor/multi_utility.c?utf8=%E2%9C%93#L720) better)

This is also true of 'filename'. We should either do what you asked or error out when you try to `COPY FROM 'file' WITH (format result)`

Added in #1829

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.