COPY TO
COPY TO
sends rows using the Postgres COPY protocol.
Syntax
Field | Use |
---|---|
query | The SELECT or TAIL query to send |
Supported option
values:
Name | Value |
---|---|
FORMAT |
text for text output (the default) |
FORMAT |
binary for binary output |
Example
Copying a view
COPY (SELECT * FROM some_view) TO STDOUT
Tailing a view with binary output
COPY (TAIL some_view) TO STDOUT WITH (FORMAT binary)