Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4EiC-0003KB-Dj for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Sep 2018 00:26:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g4EiA-0002gH-3F for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Sep 2018 00:26:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4Ei9-0002gA-SS for pgsql-hackers@lists.postgresql.org; Mon, 24 Sep 2018 00:26:49 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4Ei7-0000Wp-Ok for pgsql-hackers@postgresql.org; Mon, 24 Sep 2018 00:26:49 +0000 Received: from [192.168.127.1] (port=29976 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1g4Ei5-000CnP-2z; Mon, 24 Sep 2018 00:26:45 +0000 Received: from [127.0.0.1] (port=25774 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1g4Ei4-000JYC-E9; Mon, 24 Sep 2018 00:26:44 +0000 From: Andrew Gierth To: Tom Lane Cc: pgsql-hackers@postgresql.org, david@fetter.org, Oliver Ford , Krasiyan Andreev Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options In-Reply-To: <11683.1537748402@sss.pgh.pa.us> (Tom Lane's message of "Sun, 23 Sep 2018 20:20:02 -0400") Message-ID: <87h8ifhhcb.fsf@news-spur.riddles.org.uk> References: <20180728185958.GP17411@fetter.org> <878t3vj279.fsf@news-spur.riddles.org.uk> <2897.1537737232@sss.pgh.pa.us> <87va6vhoey.fsf@news-spur.riddles.org.uk> <9361.1537744225@sss.pgh.pa.us> <87o9cnhjwh.fsf@news-spur.riddles.org.uk> <11683.1537748402@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 24 Sep 2018 01:26:44 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane writes: >> select nth_value(x) from first ignore; Tom> No, because once IGNORE is a keyword, even unreserved, it's not Tom> legal as an AS-less alias. That rule only applies in the select-list, not in the FROM clause; table aliases in FROM are just ColId, so they can be anything except a fully reserved or type_func_name keyword. -- Andrew (irc:RhodiumToad)