Search Postgresql Archives

Re: Overriding default psql behavior | how to ignore missing fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2010-12-31, HÃvard Wahl KongsgÃrd <haavard.kongsgaard@xxxxxxxxx> wrote:
> --90e6ba488359a7721f0498b43825
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> 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 o=
> f
> transaction block"
>
> As there are thousands of files with multiple missing fields, manually
> adding every field to the table is not a option.

In that case you'll need to do that automatically (write some software),
or find some other way to load the data. 

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

no.


Perhaps load the tables into a temporary database and then copy the
columns you want, or drop the columns you dont and dump the whole
thing...

-- 
ââ 100% natural

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux