I am searching if there is a wildcard assigned to the \ meta-commandsSee description – meta-commands in Postgresql.
for example..
postgresql=> \copy scheme.table FROM 'D:\path\to\%.csv' DELIMITER ';' CSV ENCODING 'LATIN1';
Make notice of the %
in the example provided – A known declaration of wildcards could be _
, %
, .
or *
. But I do not seem to find documentation of wildcards in /meta-commands for Postresql.
Best Answer
First
\COPY
isn'tpostgresql
. That's the clientpsql
. From the docs,No, psql does not provide filename completion. However there are other wrapper around
COPY FROM STDIN
that are notpsql
and they do. For instancepgloader
providesFROM [ ALL FILENAMES | [ FIRST ] FILENAME ] MATCHING
And on top of that you can always use bash or whatever shell you're using to launch psql. Example with bash filename expansion.
Power-shell certainly also provides filename expansion. Google for it if you're on Windows 8+.