tracking errors in psql

From: brian <brian(at)zijn-digital(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tracking errors in psql
Date: 2006-11-17 18:51:35
Message-ID: 455E04B7.5040800@zijn-digital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've just gotten a dump from pgMyAdmin for a production database that i
wanted to update the dev db with. However, i'm seeing a multitude of
errors. From what i can see, the columns are mixed up in the COPY block
for a particular table. My guess is that a tab character has thrown
everything into disaray. The dump is structure & data, using COPY FROM
STDIN.

I have two questions:

1) What is the best way to track these errors? They pile up on each
other, so i can't just scroll back in the terminal (I could set the
buffer higher but i'd be scrolling all day).

2) Does anyone have any suggestions for removing the tabs in this
table's column? There's no good reason for them there (it's all HTML) so
i don't mind just removing them altogether. Do i need to use
regexp_replace(), or would replace() do the job? And are there any
quoting specifics required in order that the tab character is recognised?

Is this fine as is?

UPDATE member SET bio = replace(bio, '\t', '');

brian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leodinei Bielak 2006-11-17 19:22:47 Select slow over network
Previous Message Magnus Hagander 2006-11-17 18:15:47 Re: Why the data changes it's value by itself!