Output format is text, vertical-bar-separated, NULL as N _copy : src : bar columns : - id - name copy_to : /tmp/data. The source file does not have to exist on the same machine as the. \COPY runs COPY internally, but with expanded permissions and file access. ![]() The server based COPY command has limited file access and user permissions, and isn’t available for use on Azure Database for PostgreSQL. The NULL values are specified as N _copy : copy_from : /tmp/data.csv dst : bar options : delimiter : '|' null : 'N' - name : Copy data from acme table to file /tmp/data.txt in text format, TAB-separated _copy : src : acme copy_to : /tmp/data.txt - name : Copy data from SELECT query to/tmp/data.csv in CSV format _copy : src : 'SELECT * FROM acme' copy_to : /tmp/data.csv options : format : csv - name : Copy CSV data from my_table to gzip _copy : src : my_table copy_to : 'gzip > /tmp/' program : true options : format : csv - name : > Copy data from columns id, name of table bar to /tmp/data.txt. Both versions of COPY move data from a file to a Postgres table. name : Copy text TAB-separated data from file /tmp/data.txt to acme table _copy : copy_from : /tmp/data.txt dst : acme - name : Copy CSV (comma-separated) data from file /tmp/data.csv to columns id, name of table acme _copy : copy_from : /tmp/data.csv dst : acme columns : id,name options : format : csv - name : > Copy text vertical-bar-separated data from file /tmp/data.txt to bar table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |