Overriding default psql behavior | how to ignore missing fields

From: Håvard Wahl Kongsgård <haavard(dot)kongsgaard(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Overriding default psql behavior | how to ignore missing fields
Date: 2010-12-31 12:48:38
Message-ID: AANLkTimXQEmZz_0TzQDUZke7a81Z9VgtYKgNPnu6aKhE@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I am trying to insert new records from multiple SQL dumps into an existing
table. My problem is that the database table does not have some of the
columns used in the sql dumps. So when I try to import the dumps psql fails
with: "ERROR: current transaction is aborted, commands ignored until end of
transaction block"

As there are thousands of files with multiple missing fields, manually
adding every field to the table is not a option.

Is it possible to overriding the default psql behavior, so that the sql
session simply ignores any missing fields?

--
Håvard Wahl Kongsgård

http://havard.security-review.net/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-12-31 14:39:22 Re: Row-level permissions?
Previous Message Vincent Veyron 2010-12-31 10:01:12 Re: Restore problem