pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Another user error? [RESOLVING]
3+ messages / 2 participants
[nested] [flat]
* Re: Another user error? [RESOLVING]
@ 2020-11-01 19:50 Rich Shepard <rshepard@appl-ecosys.com>
0 siblings, 1 reply; 3+ messages in thread
From: Rich Shepard @ 2020-11-01 19:50 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
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.
David J.
Which is why I did this file chunk-by-chunk.
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.
Regards,
Rich
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Another user error? [RESOLVING]
@ 2020-11-01 20:10 Peter J. Holzer <hjp-pgsql@hjp.at>
parent: Rich Shepard <rshepard@appl-ecosys.com>
0 siblings, 1 reply; 3+ messages in thread
From: Peter J. Holzer @ 2020-11-01 20:10 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Another user error? [RESOLVING]
@ 2020-11-01 23:26 Rich Shepard <rshepard@appl-ecosys.com>
parent: Peter J. Holzer <hjp-pgsql@hjp.at>
0 siblings, 0 replies; 3+ messages in thread
From: Rich Shepard @ 2020-11-01 23:26 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Sun, 1 Nov 2020, Peter J. Holzer wrote:
> Your chunk still seems to be 2105 lines long.
Peter,
I've started from the top and work in 50-100 line chunks. I'm finding psql
errors that it had not flagged the first time through. So I'm working slowly
and carfully and expect to find all my typos and other errors when I'm done.
Thanks,
Rich
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-11-01 23:26 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-01 19:50 Re: Another user error? [RESOLVING] Rich Shepard <rshepard@appl-ecosys.com>
2020-11-01 20:10 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2020-11-01 23:26 ` Rich Shepard <rshepard@appl-ecosys.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox