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 1kYAtu-0003gm-Tb for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:35:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYAtt-0002vC-SQ for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:35:45 +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 1kYAtt-0002s4-Kk for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:35:45 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYAtr-0000Lr-JH for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:35:44 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 6E39C262CCF for ; Thu, 29 Oct 2020 09:35:42 -0700 (PDT) Date: Thu, 29 Oct 2020 09:35:42 -0700 (PDT) From: Rich Shepard To: PostgreSQL General Subject: Re: Multi-row insert: error at terminal row. In-Reply-To: <23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com> Message-ID: References: <712da077-deec-6787-2ef0-3e668acfbc17@gmail.com> <6FE34808-28CE-4550-9BC4-A70D91503D2C@gmail.com> <23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 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: Precedence: bulk On Thu, 29 Oct 2020, Paul Förster wrote: > insert ... > ( > (v1, v2, v3), > (v4, v5, v6), > (v7, v8, v9) <= this is the bracket pair that Emacs shows as matching. > ); <= this is the missing bracket. Paul/Adrian/Tom: First thing I did was look at the postgres 12 manual. On page 155 I see: You can insert multiple rows in a single command: INSERT INTO products (product_no, name, price) VALUES (1, 'Cheese', 9.99), (2, 'Bread', 1.99), (3, 'Milk', 2.99); Which is what I have. There are no extra parentheses enclosing multiple rows of VALUES. But, adding them makes no difference: same error reported. Thanks, Rich