Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"

Поиск
Список
Период
Сортировка
От Ankur Kaushik
Тема Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"
Дата
Msg-id CALXoLqxpkMWc3hO+pkWF_r0UyTVH-8Qtgd=GqX0yyWY9FfMX0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-admin

After PostGIS installation what is did executed the below command

-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
-- Enable Topology
CREATE EXTENSION postgis_topology;
-- fuzzy matching needed for Tiger
CREATE EXTENSION fuzzystrmatch;
-- Enable US Tiger Geocoder 
CREATE EXTENSION postgis_tiger_geocoder;

So there install the new schema tiger , which contains some table and data for Geo.

Now while restoring full database backup from other database server which already contain tiger schema thus it shows duplicate error for tiger schema while restoring the database on blank server.
Consequence is If only Public schema data is restored on other server its shows geometric error even if you have already installed tiger schema .

So is there any way to restore database without any error , or Can we put one line in database backup file , DROP TABLE 'table name' just before CREATE TABLE. 
  

On Mon, Jun 15, 2015 at 9:31 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Ankur Kaushik wrote:
> I think this is not a database corrupt , While create a new database there is already Entry in
> geocode_setting  tiger schema . Correct me If I am Wrong .

Well, you wrote that you were restoring to a "fresh database server", so I was assuming
that the database was empty.

Preexisting data can of course also lead to this problem.

Yours,
Laurenz Albe

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

Предыдущее
От: Kiswono Prayogo
Дата:
Сообщение: Slow when joining with view
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"