Re: Another user error? [RESOLVING]

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Another user error? [RESOLVING]
Дата
Msg-id 20201101201053.GA23387@hjp.at
обсуждение исходный текст
Ответ на Re: Another user error? [RESOLVING]  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Another user error? [RESOLVING]  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
On 2020-11-01 11:50:31 -0800, Rich Shepard wrote:
> On Sun, 1 Nov 2020, David G. Johnston wrote:
> > You encountered and asked on this exact same issue Friday...the advice in
> > that "Multi-row insert: error at terminal row." all still applies.
>
> Which is why I did this file chunk-by-chunk.

Your chunk still seems to be 2105 lines long.

As others have already suggested, your best chance is bisection.
Split that single 2000+ line insert into two inserts of 1000+ lines
each. If you are lucky, one of them will work and the other won't.
Then split the insert which doesn't work. Repeat until you either can
see and fix the error or until you are down to a single line.


> Re-doing this by portions I find psql reporting errors it did not report
> before. So, I keep re-running the command until it all works.

This is normal. PostgreSQL doesn't try to find all errors. If it finds
an error, it reports it and aborts the query. So if your statement
contains more than one error (which is quite likely in a statement over
2000 lines long), fixing one error will just show the next.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Another user error? [RESOLVING]
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Another user error? [RESOLVING]