Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j6gGw-000107-Qh for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 19:53:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j6gGv-0007tG-FA for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 19:53:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j6gGu-0007t8-TQ for pgsql-general@lists.postgresql.org; Tue, 25 Feb 2020 19:53:37 +0000 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6gGr-00067K-VW for pgsql-general@postgresql.org; Tue, 25 Feb 2020 19:53:35 +0000 Received: by mail-qv1-xf43.google.com with SMTP id o18so247427qvf.1 for ; Tue, 25 Feb 2020 11:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=wdtkPio+HfEEyV8iwRP9TQjrRSw0TclIaOCJdTN7Fow=; b=GDJM1bjh7oiG7SE9JpbYhbqXeG6e0Bvq7dmXVeA9RZ9xBsJNfx3tdNCzn1ZZr2lthN Mu/T6dqFOeMZKXxNUNd90Oc4kXLt17YfO9ERXSVir2qRK18uqmolxf0X3WsiRsVRIUcM o7E/5cTLHGVXQlMEqSZlOwfcAjzHx4DENFw47Ve7G3SzlDsLNKgHzmPlKScw2llEj/Uz g1U8Z8NA01Ib3xSezqhQTtdeies+xhjNPkKDyzkVpUVzKRZ4bSSuNCVuTTSr8/uzFVgl CsyCXFfCFTRK5I0ReF4HEcCpunn7pJ3EV8ES9qgk2eRLkuYrVviPo1h3FKcl/y5peRAB 825w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=wdtkPio+HfEEyV8iwRP9TQjrRSw0TclIaOCJdTN7Fow=; b=TiL8OSqxNruAybkXqk9/orCx1e00lJAkrsFtZzXn+UYyIGljVlm5no8tAv504SOU2R w8LjyJbLv6mS0n4DXID8769pomdIlwyBP+O0Xda9u1pwhusJLh1Moq4LILDXYzWbF1lM x73uk788SQbrZwip+t5ukaZG3FyLpJapx1ydmdEn+yC1TzL4Jdvge6cqtLlA+9IDkpzV O03n1Qjou+erirbSnhcyp2v8Krlk3PJZ8EbKvyFBzgXQXNLTsS7yiNUTtSO8pfWchlAv 1A6QTf2+NtCZy75qsuSHGu9UsS3CK+KadK6wUceik4ojYRAGdeN3t6pG+CUiMJH/mM/t wR1g== X-Gm-Message-State: APjAAAU/pJhem9oUTTv1FpmUOKVAhNitgOyrBQsiAlt3Wy+IIJU5cHh0 BCHWr3mmNiaQeP2/QypsASQp6A== X-Google-Smtp-Source: APXvYqytquKjuYkuLICOBBCuikmOadm1ANMAOeIXLxVFAfi1PRMn9oiqJJmifIimXMGPwZ4cXyCn1Q== X-Received: by 2002:a0c:b920:: with SMTP id u32mr554202qvf.173.1582660413162; Tue, 25 Feb 2020 11:53:33 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([179.56.30.174]) by smtp.gmail.com with ESMTPSA id h12sm8065221qtn.56.2020.02.25.11.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 11:53:32 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id F2AEF3005EA; Tue, 25 Feb 2020 16:53:29 -0300 (-03) Date: Tue, 25 Feb 2020 16:53:29 -0300 From: Alvaro Herrera To: Stanislav =?utf-8?Q?Moty=C4=8Dka?= Cc: pgsql-general@postgresql.org Subject: Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]] Message-ID: <20200225195329.GA303@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Feb-25, Stanislav Motyčka wrote: > Sometimes (for tables with many columns) it would be better and easier > to write "SELECT" statement with clause "EXCEPT": > "SELECT * [EXCEPT col1 [,col2]] FROM ..." I think an important initial question is how do other database systems implement this functionality, if they do, and what syntax do they offer.