Re: install sample database error

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: install sample database error
Дата
Msg-id 3728498d-fc28-4cc1-2fad-37f716eaad60@gmx.net
обсуждение исходный текст
Ответ на install sample database error  ("Cao, Xiaowei" <xicao@seattleschools.org>)
Ответы RE: install sample database error
Список pgsql-sql
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
hasthis 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
needto 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Cao, Xiaowei"
Дата:
Сообщение: install sample database error
Следующее
От: "Cao, Xiaowei"
Дата:
Сообщение: RE: install sample database error