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 1ubP7Y-000OXu-Kp for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 19:45:52 +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 1ubP7W-00Chp2-IK for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 19:45:51 +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 1ubP7W-00Chor-6t for pgsql-general@lists.postgresql.org; Mon, 14 Jul 2025 19:45:50 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ubP7U-007i2f-2N for pgsql-general@postgresql.org; Mon, 14 Jul 2025 19:45:50 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 232161D00358; Mon, 14 Jul 2025 15:45:47 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Mon, 14 Jul 2025 15:45:47 -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=1752522346; x=1752608746; bh=hekMYIi+h1O3menQPat2Rtqvt3FhdcLBwseLmGOGZtM=; b= KydI+JWJDAhfOKLHmbQUU/Xlt4+E6AdmXj43pxE5HgkmKv97PU9fPgaJQ6zwc3sJ t7ashDUUlPQcwdjuJRVj7lA1rcvdQrNkZoNnmFiNB3wpvrQ+OtZh0K32EzTTL3Q6 rAdsjP+jg4tCELRCgvlCv/wLks7v69QDDNvDZgoxRlNXZE8/GLx5bCBoPt3Nj5nr 5AWDevQBU+pLftQ9hirj9l1NUVoYMe5QK3olvf24iGIBaW3HBEwt3Qoa+wYr4vbk QClAUB+2NsrVXp8CMksMKriyiuaTSu11/GZcziA0UD2s5O0Rh4tlNaBL/X4/IQed MLFHHEQ3G7NrnATqHqpz9w== 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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1752522346; x= 1752608746; bh=hekMYIi+h1O3menQPat2Rtqvt3FhdcLBwseLmGOGZtM=; b=L M7+kF0Moa5OOCGYUv4Co97ho0dmjPZtZY7JObDXJR4/YpnzmPdk2kB/GUDKJXS6q hID09G7nQ1LMM2nxKe8XTH3AsyVG69kTK/rAPPhDuQKFwBguLkYNfAjsaC82qK1I p3Op6yMOXmYZS5OZGIIMCtlPK8gno/LJ5ODZnBXQO2D+QmYKak1XScLI9lHVmHTQ fxIjeCM8Q4ImLUVm8dtrB8Pb7FIjjYAen4bSbhsBNcy8uBd8ARxgnAs/Rw0SiKv3 QCXzo1ON/gPc1LGXw1+R69DfImfQGWwHgB1hDSItDwcBLI78Bcim3QzHUvGYTGqk FzD7VcNBqD2Zd+QLIbXRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdehvdekfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfhfvefhjggtgfesthejredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpefgieevffffheefheeihfekvdeuheefleefjeefgeffudeu iefhvdeifefhvedvgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehrshhhvghprg hrugesrghpphhlqdgvtghoshihshdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghn vghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Jul 2025 15:45:46 -0400 (EDT) Message-ID: Date: Mon, 14 Jul 2025 12:45:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Syntax error needs explanation To: Rich Shepard References: <9c84776d-d938-9fa4-ab1-6ee960ce6e7d@appl-ecosys.com> <7ec33517-6dc1-4e1d-b741-0c26eba7cc79@aklaver.com> Content-Language: en-US Cc: pgsql-general From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/14/25 12:38, Rich Shepard wrote: Reply to list also. Ccing list. > On Mon, 14 Jul 2025, Adrian Klaver wrote: > >> The above looks like the format 'aligned' output from a query. > > Adrian, > > I mistyped the script's extension as .txt rather than .sql. That does not matter, that is more for user convenience in figuring out what the files are for. \o test.txt select * from cell_per; Then doing: psql -d production -U postgres -h localhost -p 5432 -f test.sql Null display is "NULL". psql:test.sql:82: ERROR: syntax error at or near "line_id" LINE 1: line_id | category | cell_per | ts_insert | psql -d production -U postgres -h localhost -p 5432 -f test.txt Null display is "NULL". psql:test.txt:82: ERROR: syntax error at or near "line_id" LINE 1: line_id | category | cell_per | ts_insert | ... The error is the same as psql just processes the file without regard to the extension. > > Regards, > > Rich -- Adrian Klaver adrian.klaver@aklaver.com