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 1lPCmV-000815-1W for pgsql-docs@arkaria.postgresql.org; Wed, 24 Mar 2021 23:19:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPCmT-000563-Uv for pgsql-docs@arkaria.postgresql.org; Wed, 24 Mar 2021 23:19:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPCmT-00055u-PW for pgsql-docs@lists.postgresql.org; Wed, 24 Mar 2021 23:19:17 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPCmN-0006E5-9j for pgsql-docs@lists.postgresql.org; Wed, 24 Mar 2021 23:19:17 +0000 Received: by mail-pg1-x532.google.com with SMTP id r17so15872755pgi.0 for ; Wed, 24 Mar 2021 16:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z4jfyRkzHgQc6FuViRVkGSVsf7jEZyfwhVUyMyv62W4=; b=DbszAfeVMhp6vip7Wp05WXyjBj6kuFrBNYVYd+9vfXPbjmnWaadlUJIqlCas5BFtqc m+eKmFGdUjP+q6JEHPIOVTSDvUt2rKOescAYhxA7fAaND7K/shrpEMe4070aGUIafgzi 7Wt25lqv5RbWp17YJx2lhqgKRNA8HYry+ZRwVSLGF2RpYg3I8NNmw2stNrX7gTIzaQSx 0zOMl6YMLUBN+qiu0HYfFjXYz7tDid4Jfmk7ApRpyO52lUMXTzQKB4ldDGRQqQOuoBto Xt6SwWRygdxfbHo59o3EKnfgRYCXYMu6wZq8Oxh26fyr1AEGnOjWD0UaRFe8PvTH/iG4 bm6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z4jfyRkzHgQc6FuViRVkGSVsf7jEZyfwhVUyMyv62W4=; b=IRcBm0iSscktSk3dZouD44GfFru7b7+5fmrQZ3ZoLPK+whCuXLzFbkvZTvUbivAA7z Iy3Qk2BRannQEG65UMewrtqXBaZ/BC0Ccp0NEzoWPfhfgFhtyWc1RZHaNfG7p6EG0SMs IicqjI/DrGk7UpMdCAC6i0mxNf09hd80Jv74nuZU7mBO2yLX6z/sHa9sxOUe8fr50HJF CTtYN923auiUt/k/HU6IYuqK9yXuZPIpGtyDJ0kqQu+CqLg2zl1cwig7N0TMMsrxVs2+ nJF+JkQqnz/isNFr6b2eeC3c4KgvE+DIDOwTOFhc3Firgi++fmz+sCRQTMuWm2TXLeXN ZqFg== X-Gm-Message-State: AOAM530kNiOZp18dKvC5nOLqjPmT1OC1KBrXKzWe3fl56MArEpreHD/8 0PWpPhgTU6txUiiiaG236GbLNsnTCsvGyMUk8G4= X-Google-Smtp-Source: ABdhPJzGlpv58lbJfWIV0sIlP+4vfGpQsDjyz2BDCIdYTpKCvkuHOR07bR194BJQTS5D/YE8YvOhVoBi6OqZ6n7eNJQ= X-Received: by 2002:a62:3201:0:b029:211:3dcc:c9ca with SMTP id y1-20020a6232010000b02902113dccc9camr5271678pfy.46.1616627948141; Wed, 24 Mar 2021 16:19:08 -0700 (PDT) MIME-Version: 1.0 References: <161626776179.652.11944895442156126506@wrigleys.postgresql.org> In-Reply-To: From: "David G. Johnston" Date: Wed, 24 Mar 2021 16:18:50 -0700 Message-ID: Subject: Re: "there is no way to insert less than one row" To: Peter Eisentraut Cc: max1@inbox.ru, Pg Docs Content-Type: multipart/alternative; boundary="00000000000095411a05be508649" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000095411a05be508649 Content-Type: text/plain; charset="UTF-8" On Wed, Mar 24, 2021 at 1:29 PM Peter Eisentraut < peter.eisentraut@enterprisedb.com> wrote: > On 20.03.21 20:16, PG Doc comments form wrote: > > So, the last insert command inserted zero rows. What is meant by "there > is > > no way to insert less than one row"? > > I think the point was that you can't insert partial rows. > Sure, if you think its related to the following sentence. If you think its related to the subsequent one it means "cannot insert zero rows". Frankly, both interpretations are wrong, inserting an explicit column list with omitted columns populated using defaults is a "partial row API" for inserting data. I'm also not fond of the word "conceptually" here - its actually a physical reality that regardless of how one or more rows are supplied they are inserted one-at-a-time so far as constraints, discussed in the previous chapter, are concerned (though some constraints can be deferred). David J. --00000000000095411a05be508649 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Mar 24, 2021 at 1:29 PM Peter Eisentraut <peter.eisentraut@enterprise= db.com> wrote:
On 20.03.21 20:16, PG Doc com= ments form wrote:
> So, the last insert command inserted zero rows. What is meant by "= ;there is
> no way to insert less than one row"?

I think the point was that you can't insert partial rows.

Sure, if you think its related to the following senten= ce.=C2=A0 If you think its related to the subsequent one it means "can= not insert zero rows".=C2=A0 Frankly, both interpretations are wrong, = inserting an explicit column list with omitted columns populated using defa= ults is a "partial row API" for inserting data.

I'm also not fond of the word "conceptually" here - its= actually a physical reality=C2=A0that regardless of how one or more rows a= re supplied they are inserted one-at-a-time so far as constraints, discusse= d in the previous chapter, are concerned (though some constraints=C2=A0can = be deferred).

David J.

--00000000000095411a05be508649--