Re: Temp tables and copy

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Konstantin Goudkov" <bcc-ng(at)idftech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Temp tables and copy
Date: 2003-09-10 08:20:51
Message-ID: 200309100920.51597.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 10 September 2003 02:22, Konstantin Goudkov wrote:
> I posted it to the pgsql-hackers list, but I did not seem to get through.
>
> Not even sure if this is a bug or a feature :)
>
> When I create a temp table and then try to copy some data into the
> table, if the data is corrupt and the synchronization is lost - the
> table also seems to get lost.

A message like this?
lost synchronization with server, resetting connection

Temporary tables get removed when the connection is broken. In any case, all
or nothing of the COPY ... FROM should work, so you can't check what was the
first item that failed.

If you use the \i from psql's command line you can get line numbers for the
file, or "psql -f filename" will do the same.

PS - I've found that writing a small Perl script to process import files and
fix bugs saves me time. It takes longer the first time, but if I need to
re-import (and it seems I always do) then I can just run the perl over my
source data.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2003-09-10 08:23:46 Re: SUMMARY mysql -> psql
Previous Message Thierry Missimilly 2003-09-10 08:14:32 Postgres 7.4Beta2 Thread-safe