Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on Windows / import ERROR by newline code difference #12

Open
harukat opened this issue Dec 15, 2023 · 0 comments
Open

on Windows / import ERROR by newline code difference #12

harukat opened this issue Dec 15, 2023 · 0 comments

Comments

@harukat
Copy link

harukat commented Dec 15, 2023

First, I am happy to report that pg_dbms_stats works fine on Windows (MSVC build), as far as I can tell, except as noted below.

The export scripts export_effective_stats-*.sql.samle and export_plain_stats-*.sql.sample doesn't work in Windows OS because of newline code difference. It causes the following error when importing.

db1=# SELECT dbms_stats.import_table_stats('public', 't1', 'C:\pdata\14.10\export_stats.dmp');
ERROR:  COPY file signature not recognized

I was able to avoid this error by writing TO 'server-side file path' instead of using \o and TO STDOUT in the scripts. I would suggest adding scripts like this for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant