public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Finding error in long input file
Date: Wed, 10 Jul 2024 05:52:58 -0700 (PDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGqBcTavtJS36PnuYs1yHHH2f6kM79NVhKiOcnn5orYNXJawxQ@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAGqBcTavtJS36PnuYs1yHHH2f6kM79NVhKiOcnn5orYNXJawxQ@mail.gmail.com>
On Tue, 9 Jul 2024, Craig McIlwee wrote:
> The input file is 488 lines (presumably, since Rich said the file should
> insert 488 rows). It seems like too much of a coincidence that the last
> character of the last line is really the error. My guess is that there is
> an unmatched character, perhaps a parenthesis, that is throwing off the
> parser because it doesn't expect the statement to terminate yet. Maybe
> that unmatched char really is on the last line, but '85250 Red House Rd'
> doesn't seem like the issue. I don't know anything about the joe editor,
> but I'd hope that any decent editor with syntax highlighting would make it
> apparent where things went awry.
Craig, et al.,
I use emacs for scripts and coding, joe's only for small jobs.
I added a line to the file so the bottom line is now 489. The attached image
shows that line is the only one terminated with a semicolon rather than a
comma.
psql would tell me if there was no closing parenthesis on a line, if the
terminating comma was missing, or other similar error, and would tell me the
number of the line or following line. Having the error marked at the end of
the file does not tell _me_ just where the error actually is.
Partial screenshot attached.
Thanks all,
Rich
Attachments:
[image/png] postgres-insert-issue.png (23.4K, 2-postgres-insert-issue.png)
download | view image
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Finding error in long input file
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox