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 1sRPPG-00F3UC-G5 for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 04:58:18 +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 1sRPPE-0021Ws-3w for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 04:58:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRPPC-0021VZ-Ns for pgsql-general@lists.postgresql.org; Wed, 10 Jul 2024 04:58:15 +0000 Received: from fout2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRPP9-001JZx-2h for pgsql-general@postgresql.org; Wed, 10 Jul 2024 04:58:13 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 94385138053D; Wed, 10 Jul 2024 00:58:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 10 Jul 2024 00:58:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1720587489; x=1720673889; bh=RmtHhBVw8IetGv9hT0YdKDc6cEb4Ig2NnPXkWW8nQgs=; b= BaQ0BDdJgf/V5tE+dgsLzhu9TsJUb8Xn4rqYMYjt8tqCHlcf56bSjI1ZuHlxdEGc zFlT3v+cVwonKMC49ga/Q0AAH4okillEzrQHw56QgFU7ZC6lNz+iMGE9C4/It+Oh 13qIui7SUrhSvo/qrOHd6BdkxTh8AYlMAJuAJK/yaq1zdZIYTjBS6EZb7mywqKQL 5jWjF/e6xR216lHhb8/SZ3M0+iOvUMYzT9kW/0/KMVb/R+EXQZtm6YAOkIoGx1JX sP5wpRH803HDWJtp7XZh4oHTY7Jk58DzZyQr8LAxwa9+oGrbuVr0NBNvhaPLb9SC iwD0MbOAWePnwIIBbBMl7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1720587489; x= 1720673889; bh=RmtHhBVw8IetGv9hT0YdKDc6cEb4Ig2NnPXkWW8nQgs=; b=k FCMTAxEAyuVgdJc6L8GUpYXydjfKUUe80cPCRLqOMn8mn0pqiO4cM4jDJOO3dnse aVH6fMo8oN4EZ2bmwu0ImyprW4kk+2dHGwdWaymk5fc5Tx65rj6epSLphKPQpxAn G+slVr9AyHX89jizTqKydEha6srGU6pJIOZxaiZbrsHcFqK0LCQ+vJV7liCeMU0T UDO+1Tiv0RDQqZb5Kxm8+rkNeSIql5yx7Q4BpAAzaW2TzjarTEePmhZTe5oZ4M5V W0fLd+ztjrVl2uf27Fv5Z1DFMcozsRImz7YgAK9NSqzmNNebeGNguYUFX3qUYm4K bIEK5bT36zDcVHmaP409w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrfedtgdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeefgeefieeutdfggfetgefgheekjeehteeileeigfet ieekjedvieeviefgheevtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jul 2024 00:58:07 -0400 (EDT) Message-ID: <155fc2ec-d936-4838-b4dd-ca7d06acb6a1@aklaver.com> Date: Tue, 9 Jul 2024 21:58:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Finding error in long input file To: Craig McIlwee Cc: Rich Shepard , pgsql-general@postgresql.org References: <71cf3e97-a0a5-4a94-add8-989cd1e2311d@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/9/24 17:46, Craig McIlwee wrote: > 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 This assumes that there where only INSERT lines and that each INSERT was only one line. I have bit by those assumptions before, hence my suggestion to actually find line 488. > 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 -- Adrian Klaver adrian.klaver@aklaver.com