agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedinstall sample database error
4+ messages / 3 participants
[nested] [flat]
* install sample database error
@ 2019-07-30 23:27 Cao, Xiaowei <xicao@seattleschools.org>
0 siblings, 1 reply; 4+ messages in thread
From: Cao, Xiaowei @ 2019-07-30 23:27 UTC (permalink / raw)
To: pgsql-sql@lists.postgresql.org <pgsql-sql@lists.postgresql.org>
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?
Thanks,
Anne Cao
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: install sample database error
@ 2019-07-31 06:16 Thomas Kellerer <spam_eater@gmx.net>
parent: Cao, Xiaowei <xicao@seattleschools.org>
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Kellerer @ 2019-07-31 06:16 UTC (permalink / raw)
To: pgsql-sql@lists.postgresql.org
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:
http://www.postgresqltutorial.com/load-postgresql-sample-database/
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: install sample database error
@ 2019-07-31 16:28 Cao, Xiaowei <xicao@seattleschools.org>
parent: Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 4+ messages in thread
From: Cao, Xiaowei @ 2019-07-31 16:28 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; pgsql-sql@lists.postgresql.org <pgsql-sql@lists.postgresql.org>
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@gmx.net>
Sent: Tuesday, July 30, 2019 11:16 PM
To: pgsql-sql@lists.postgresql.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:
https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresqltutorial.com%2Fload-p...
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: install sample database error
@ 2019-07-31 16:30 Rob Sargent <robjsargent@gmail.com>
parent: Cao, Xiaowei <xicao@seattleschools.org>
0 siblings, 0 replies; 4+ messages in thread
From: Rob Sargent @ 2019-07-31 16:30 UTC (permalink / raw)
To: pgsql-sql@lists.postgresql.org
/usr/bin/unzip some.zip
On 7/31/19 10:28 AM, Cao, Xiaowei wrote:
> 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@gmx.net>
> Sent: Tuesday, July 30, 2019 11:16 PM
> To: pgsql-sql@lists.postgresql.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:
>
> https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresqltutorial.com%2Fload-p...
>
> 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.
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-07-31 16:30 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 23:27 install sample database error Cao, Xiaowei <xicao@seattleschools.org>
2019-07-31 06:16 ` Thomas Kellerer <spam_eater@gmx.net>
2019-07-31 16:28 ` Cao, Xiaowei <xicao@seattleschools.org>
2019-07-31 16:30 ` Rob Sargent <robjsargent@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox