COPY TO
COPY TO
sends rows using the Postgres COPY protocol.
Syntax
Field |
Use |
query |
The SELECT or TAIL query to send |
field |
The name of the option you want to set. |
val |
The value for the option. |
WITH
options
Name |
Value type |
Default value |
Description |
FORMAT |
TEXT ,BINARY |
TEXT |
Sets the output formatting method. |
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);