Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYAEb-000214-6t for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 15:53:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYAEa-0004tn-67 for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 15:53:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYAEZ-0004tT-V9 for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 15:53:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYAET-0008QC-Rq for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 15:53:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09TFqtLW1549698; Thu, 29 Oct 2020 11:52:55 -0400 From: Tom Lane To: Rich Shepard cc: pgsql-general@lists.postgresql.org Subject: Re: Multi-row insert: error at terminal row. In-reply-to: References: Comments: In-reply-to Rich Shepard message dated "Thu, 29 Oct 2020 08:43:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1549696.1603986775.1@sss.pgh.pa.us> Date: Thu, 29 Oct 2020 11:52:55 -0400 Message-ID: <1549697.1603986775@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rich Shepard writes: > I'm loading data into tables with the 'insert' statement. There are many > rows containing values and each is bracketed by parentheses except for the > last row. That's terminated with a semicolon, but psql reports an error > there: > psql:organizations.sql:1926: ERROR: syntax error at or near ";" > LINE 1925: ...m',null,'Port','Opportunity',null); > ^ > I'm not seeing why that's an error. All previous rows terminate with a comma > and I don't know where else to look for the reason. What am I missing > seeing? First thought is that you might need another right parenthesis there. regards, tom lane