"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> testdb=# COPY users TO 'D:\Program Files\PostgreSQL\DataFlatFiles\usersdata';
> ERROR: relative path not allowed for COPY to file
You need to double the backslashes. Or use forward slashes.
regards, tom lane