С чего начать Первые шаги трек · 15 ступеней
Linux Labs

Веб-стек

Тест: PostgreSQL

Вопрос 7 из 10
Выйти из теста

Прочитай вывод

Вчерашний дамп восстановили прямо в рабочую shop. Почему новый заказ не записался?

$ pg_restore -d shop shop.dump
…
pg_restore: warning: errors ignored on restore: 9
$ psql -d shop -c 'SELECT count(*) FROM orders'
     6
$ psql -d shop -c 'INSERT INTO orders (customer_id, amount) VALUES (1, 10)'
ERROR:  duplicate key value violates unique constraint "orders_pkey"
DETAIL:  Key (id)=(6) already exists.
Загрузка…