From: | "Cao, Xiaowei" <xicao(at)seattleschools(dot)org> |
---|---|
To: | Thomas Kellerer <spam_eater(at)gmx(dot)net>, "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org> |
Subject: | RE: install sample database error |
Date: | 2019-07-31 16:28:37 |
Message-ID: | MWHPR0401MB3515D32B68DE114A5B92A110CBDF0@MWHPR0401MB3515.namprd04.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks, yes, I tried to install that sample database from ubuntu terminal. The file I downloaded for the sample database is a .zip file.
The link in your email seems for windows version.
What command should I use to achieve : "you only need to unzip the ZIP archive, that gives you a .tar file which you do NOT need to unpack."
Thanks
-----Original Message-----
From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Sent: Tuesday, July 30, 2019 11:16 PM
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: install sample database error
Cao, Xiaowei schrieb am 31.07.2019 um 01:27:
> I tried to download the postgresql sample database dvdrental to install on ubuntu. This is a test environment.
>
> I got some errors while running the restore.sql in the downloaded file.
>
> Psql : restore.sql 1015: Error: could not open file $$PATH$$/3077.dat for reading: NO such file or directory.
>
> And the same error for all other dat files…
>
>
> I guessed first the permission issue, I tried to give the file directory the widest privilege like 777, but still has this error.
>
> Database and tables are created, but there are no rows in table.
>
> What could be wrong, what does $$PATH$$ mean?
I assume you are referring to the sample database from:
You can't restore that sample database using psql, you need to use pg_restore.
As described in the link above, you only need to unzip the ZIP archive, that gives you a .tar file which you do NOT need to unpack.
Assuming you did already create the dvdrental database, you can restore the backup using:
pg_restore -U postgres -d dvdrental /path/to/dvdrental.tar
Thomas
CAUTION: This email originated from outside of the organization. Please don't click links, open attachments, or reply with confidential details unless you are certain you know the sender and are expecting the content.
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2019-07-31 16:30:38 | Re: install sample database error |
Previous Message | Thomas Kellerer | 2019-07-31 06:16:29 | Re: install sample database error |