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.89) (envelope-from ) id 1gnqfz-0000SC-16 for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jan 2019 20:05:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gnqfx-0006js-QO for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jan 2019 20:05:05 +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 1gnqfx-0006jl-ER for pgsql-hackers@lists.postgresql.org; Sun, 27 Jan 2019 20:05:05 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnqfu-0005xa-OR for pgsql-hackers@lists.postgresql.org; Sun, 27 Jan 2019 20:05:04 +0000 Received: by mail-pg1-x52d.google.com with SMTP id w6so6309991pgl.6 for ; Sun, 27 Jan 2019 12:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=z1mG09ZZR9wgJNDMHe6VHS3MYIQBJezYYeTgpSvARu0=; b=Oq0fTuCNwAzEQdj08V2C6Bo3Vm7cJP8C+j47h+b59RDgShfDnwUHSmmpFaCGEDdaEr dj6oVs5VczzPhaFE8mq5u0A7y4At+h6IGAILLbpe/wLA+LUNb7VFMvnL6Tjkv20W7sLz ej4MOyfoMsP+stlLgnzFoJaHyhu8ENBKfS58OA5kDksTqmOtsFef2eq7PXRHuaUMN7iV UQ6hcLAmv3QbePariZVDhD4cuN2eo0cjpmLB+MZ0wFU7iERLewU0/91IZE1yqb6wdaQ3 sUENMzR9xVHBirwDK/PTY8WszBWbCWbEPT3WaT4mtrWJUmfWB4RNb+jtwy+CPA78V5je EWPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=z1mG09ZZR9wgJNDMHe6VHS3MYIQBJezYYeTgpSvARu0=; b=uYQujxrUQ9PyHsWaGmBCTbaz+T+OcG1z4Z5xMPU8h9nchSQZPdqjyZZqd6uCZFQ+9+ e4GflcysV50SUtC0y3yu6OIAtbVcNQCjgXoRZXixZiOaNnqBsmA7PXl38jPsmYcBSLDB UjiMS9t/59WjLXQVRVIAQ1CFjoskfIz8jnAp03HjWxDpbZkwFeAWhM7LJNBcNSGyH1f2 JXmc7MgWFuK5lJDNm7/QGNyd56KZDlOHqs+ajUTwuwuLeJQXoopyin+B8+Z5E7Eh9SwU rdHL7Ph7GsgrBokhEwgIdmOGMod3GBau7ke7AkUpTfgTsiFkJcpF31WLUSFArszLaAVn h3Eg== X-Gm-Message-State: AJcUukeNjj+C7QTu0HCkWSm7ThRSkBMf5RqBdubrO5AOxSWbwwLxCnyh iYnjrWrJrZ2+Aqo/dHOOUzFTvujr X-Google-Smtp-Source: ALg8bN7/WXk2uq9l5G+3VpH4qGsH7138khW1Q03sRXvWBgGt0XC8ruD3mqOiMWuSG+cYNUZSV+yd8g== X-Received: by 2002:a65:65c9:: with SMTP id y9mr17738568pgv.438.1548619501403; Sun, 27 Jan 2019 12:05:01 -0800 (PST) Received: from marks-mbp.wavecable.com (24-113-197-199.wavecable.com. [24.113.197.199]) by smtp.gmail.com with ESMTPSA id z9sm76776451pfd.99.2019.01.27.12.04.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Jan 2019 12:05:00 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: "SELECT ... FROM DUAL" is not quite as silly as it appears From: Mark Dilger In-Reply-To: <20496.1548464946@sss.pgh.pa.us> Date: Sun, 27 Jan 2019 12:04:52 -0800 Cc: David Rowley , PostgreSQL Hackers Content-Transfer-Encoding: 7bit Message-Id: <810DE61F-7332-492E-A730-E78006388BB8@gmail.com> References: <15944.1521127664@sss.pgh.pa.us> <9565.1539573909@sss.pgh.pa.us> <154342395130.2093.8013327151440360209.pgcf@coridan.postgresql.org> <12357.1543518669@sss.pgh.pa.us> <20472.1546631337@sss.pgh.pa.us> <21565.1547498912@sss.pgh.pa.us> <20496.1548464946@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jan 25, 2019, at 5:09 PM, Tom Lane wrote: > > David Rowley writes: >> As far as I can see the patch is ready to go, but I'll defer to Mark, >> who's also listed on the reviewer list for this patch. > > Mark, are you planning to do further review on this patch? > I'd like to move it along, since (IMO anyway) we need it in > before progress can be made on > https://commitfest.postgresql.org/21/1664/ > > regards, tom lane These two observations are not based on any deep understanding of your patch, but just some cursory review: The swtich in src/backend/parser/analyze.c circa line 2819 should probably have an explicit case for RTE_RESULT rather than just a comment and allowing the default to log "unrecognized RTE type", since it's not really unrecognized, just unexpected. But I'm not too exercised about that, and won't argue if you want to leave it as is. Similarly, in src/backend/commands/explain.c, should there be a case for T_Result in ExplainTargetRel's switch circa line 2974? I'm not sure given your design whether this could ever be relevant, but I noticed that T_Result / RTE_RELATION isn't handled here. Applying your patch and running the regression tests is failing left and right, so I'm working to pull a fresh copy from git and build again -- probably just something wrong in my working directory. mark