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

Windows File/Folder Permissions for COPY #1

Open
anthonydb opened this issue Oct 10, 2021 · 0 comments
Open

Windows File/Folder Permissions for COPY #1

anthonydb opened this issue Oct 10, 2021 · 0 comments

Comments

@anthonydb
Copy link
Owner

anthonydb commented Oct 10, 2021

If you're a Windows user, you may need to set permissions for the folder holding the code and data for the book. If you don't, you may see an error similar to this:

ERROR: could not open file "C:\YourDirectory\us_counties_2010.csv" for reading: Permission denied
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
SQL state: 42501

To correct this, follow the directions in the note on in Chapter 1 (Practical SQL 2nd edition), in the section "Downloading Code and Data from GitHub":

Windows users will need to provide permission for the PostgreSQL database you will
install to read and write to the contents of the practical-sql-2-master folder. To do
so, right-click the folder, click Properties, and click the Security tab. Click Edit and
then Add. Type the name Everyone into the object names box and click OK. Highlight
Everyone in the user list, select all boxes under Allow, and then click Apply and OK.
@anthonydb anthonydb pinned this issue Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant