Re: how to continue after error in batch mode with psql

From: "Urs Rau (UK)" <urs(dot)rau(at)uk(dot)om(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to continue after error in batch mode with psql
Date: 2010-05-06 08:05:19
Message-ID: 4BE2783F.1010604@uk.om.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Jasen,

Jasen Betts wrote:

>
> why not just copy the whole lot into a temp table (like the target
> table but with text fields instead of fixed-width varchar)
> and then do a select on that to find the over-length lines and another
> select to insert the good data into the real target table.
>

Thanks, we did that. In fact the postgresql db schema is generated from
a xml file, so we changed fields where this applies to now be text and
made them bigger in postgresql schema. Now the nightly mirroring runs
through. without any field 'over-runs' stopping it.

Regards,

--
Urs Rau

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Urs Rau (UK) 2010-05-06 08:05:39 Re: how to continue after error in batch mode with psql
Previous Message Jorge Torralba 2010-05-05 23:26:19 Superuser lacking privs