Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRLUD-00EbEc-AS for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 00:47:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sRLUA-000zAU-U9 for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 00:47:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRLUA-000zAL-EJ for pgsql-general@lists.postgresql.org; Wed, 10 Jul 2024 00:47:06 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sRLU2-001IxG-3A for pgsql-general@postgresql.org; Wed, 10 Jul 2024 00:47:05 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52eafec1e84so3143588e87.0 for ; Tue, 09 Jul 2024 17:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vt-edu.20230601.gappssmtp.com; s=20230601; t=1720572416; x=1721177216; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XvZZr9hAMoLeux7Hhwucb0xFgG2Kos/DiRzkiXa1Rtc=; b=Y2Aba/KEkrzdX/m+oOBtr446TGBLHN9oUn5MelTnBYWRJrm/6KUL1O4eVlK6bM3+aU ARoVHjZ16j8v24A5cqnatHs1/3mSnHowW+LlTCXTLuycI6yAnH5FyUjNmBQKakxcyPXj e+Lq7HPPKdH78AnNp9EHUotESQg90SzdwHTP3G29qqWaOTpo/a/8QCQxW/HBEygG5/Yn R/TKiuNj2WVaydGp9TFyyDkSned1bxaKuKQ4abxr9Wn/Y7pQK/Y/QqhKkynW0rOzD2Jt +QCBAaIs3VmnmwnfX+LBFvHTd8EISCXgcb/fOYuJOTdCu6qVEyj7JvmNOZPf+SNl3s22 8vSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720572416; x=1721177216; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XvZZr9hAMoLeux7Hhwucb0xFgG2Kos/DiRzkiXa1Rtc=; b=DolBUE2s2sgusOp4MbPXyQiBKHsQupdwNrNljF3YjQKolzI66OouEZNOOaZCDe174O JIyXXydw8XHCGLyJDupO+G+XCbgaNlqU40TKUsay9HQj3S/nCHNRkeFKtSbi6lthPwSH GqQ7QH7QXli8Ye2G6dIuE5KsJIDKdEiCDSO2Yam6DP1fBsMy//biG+FXcyT5sKiAbcO+ r+5EUR+3xOYHIHmCpZD+N20XnYrom9SqaWz6B4VmjJoK0AQWidEp2ezCP5KBTXMxe3Iy QohR8W+lZLJwh410GT3OFOvytxeLxc1/Sb6svo0AO4SuULIrcrsY/PYhc5jETWooYuto RGwg== X-Forwarded-Encrypted: i=1; AJvYcCVzuHTLGaVz1wMugshgpkZWdcr0nh4LCJNPQ3TQLhOL9pXLO6L9lpA0dof9RL/r2PozzEK43D5zlXmYNR3V2P/vQaZT5gWoD8ABpRyP X-Gm-Message-State: AOJu0YxqfU8j7hetZyFI++sokuAKW9Hkt3IYjOW4w/gqek2ws2mNq5y6 yiDkaHBkbAul/n+ZOQQBUv/9v9Le64O1wLnY8WzFZO5pYVhUzjco6R4vYkdDbrvebpHfCN6kqZD lJ2WxU+fMQijYwojttXAgORt9DV0kis2z0KCQlEwU4m6+GnFG98Y= X-Google-Smtp-Source: AGHT+IErIBggTgnwPBgwSAyrpp27/EMV3XbQ3ibPUX1k5/ESfzb3gzVu/iLuOkDZfRmbduWToHnbjNhcfO3FFX26hG4= X-Received: by 2002:ac2:5e9c:0:b0:52c:84d1:180e with SMTP id 2adb3069b0e04-52eb99d4fd8mr1844337e87.67.1720572415514; Tue, 09 Jul 2024 17:46:55 -0700 (PDT) MIME-Version: 1.0 References: <71cf3e97-a0a5-4a94-add8-989cd1e2311d@aklaver.com> In-Reply-To: From: Craig McIlwee Date: Tue, 9 Jul 2024 20:46:45 -0400 Message-ID: Subject: Re: Finding error in long input file To: Adrian Klaver Cc: Rich Shepard , pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000a343ef061cd9fbc7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a343ef061cd9fbc7 Content-Type: text/plain; charset="UTF-8" Full error message from earlier in the thread: > psql:scripts/insert-addrs.sql:488: ERROR: syntax error at or near ";" > LINE 488: ...2832,1,default,'85250 Red House Rd','Paisley','OR','97636'); > ^ The error: > > LINE 488: ...2832,1,default,'85250 Red House Rd','Paisley','OR','97636') > > is giving you the line number and the data: > a) Navigate to that line number using whatever method Joe has for that. > b) Search for '85250 Red House Rd'. > 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 --000000000000a343ef061cd9fbc7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Full error message from earlier in the thread:
<= div>
> psql:scripts/insert-addrs.sql:488: ERROR:=C2=A0 syn= tax error at or near ";"
> LINE 488: ...2832,1,default,'= ;85250 Red House Rd','Paisley','OR','97636');>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^


The error:

LINE 488: ...2832,1,default,'85250 Red House Rd','Paisley',= 'OR','97636')

is giving you the line number and the data:
a) Navigate to that line number using whatever method Joe has for that.
b) Search for '85250 Red House Rd'.

=
The input file is 488 lines (presumably, since Rich said the file = should insert 488 rows).=C2=A0 It seems like too much of a coincidence that= the last character of the last line is really the error.=C2=A0 My guess is= that there is an unmatched character, perhaps a parenthesis, that is throw= ing off the parser=C2=A0because it doesn't expect the statement to term= inate yet.=C2=A0 Maybe that unmatched char really is on the last line, but = '85250 Red House Rd' doesn't seem like the issue.=C2=A0 I don&#= 39;t know anything about the joe editor, but I'd hope that any decent e= ditor with syntax highlighting would make it apparent where things went awr= y.

Craig
--000000000000a343ef061cd9fbc7--