Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4014596
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:30:57+00:00 2026-05-20T09:30:57+00:00

I am using pgAdmin III at my work and postgresql at work and at

  • 0

I am using pgAdmin III at my work and postgresql at work and at the remote hosting server (webfaction). Through Putty I am creating a tunnel for pgAdmin to work with my local and my remote databases. I have a table which primary key is referenced by other tables’ keys (as a foreign key).

What is the best way to update that remote table with the values I have on my local table?

What I (unsuccessfully) try to do is ‘backup’ my local table and then try to ‘restore’ my remote table with that file. However, pgAdmin III gives me duplicate key value error.

pg_restore: connecting to database for restore
pg_restore: restoring data for table "main_city"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1972; 0 17110 TABLE DATA main_city user
pg_restore: [archiver (db)] COPY failed: ERROR:  duplicate key value violates unique constraint "main_city_pkey"
CONTEXT:  COPY main_city, line 1: "1    London  20  30  4   1"
pg_restore: setting owner and privileges for TABLE DATA main_city
WARNING: errors ignored on restore: 1

Process returned exit code 1.

Shall I try another postgresql client? It is a pain if I try to remove all those references and try to update manually. Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:30:58+00:00Added an answer on May 20, 2026 at 9:30 am

    I know nothing about pgAdmin but how about adding the data from the file into a temporary table and the updating/inserting it into the original table depending on if rows exist or not?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a posgreSQL database and I am using pgAdmin III to work with
I am using pgAdmin version 1.14.3. PostgreSQL database version is 9.1. I got all
Total n00b question here. I am using pgAdmin to attempt to administer a remote
I'm using PostgreSQL with pgadmin. I need to replace multiple characters in all fields
I'm using Windows XP and I've installed PostgreSQL 8.3.5-2. I can create databases via
I tried to create databases with different encoding in postgres (I'm using PgAdmin as
I'm using pgAdmin III 1.8.4 and finding it a harsh mistress. When writing stored
This is my first time using postgresql. I have checked and the server definitely
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using SQL Server 2008 R2 we are looking for a way to select the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.