Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZ3ct-000227-3X for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jan 2018 23:48:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZ3cs-0007WO-1Q for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jan 2018 23:48:14 +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.84_2) (envelope-from ) id 1eZ3cr-0007WE-Mz for pgsql-hackers@lists.postgresql.org; Tue, 09 Jan 2018 23:48:13 +0000 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eZ3cj-0008Rg-B2 for pgsql-hackers@postgresql.org; Tue, 09 Jan 2018 23:48:12 +0000 Received: by mail-wr0-x22b.google.com with SMTP id p6so15797296wrd.0 for ; Tue, 09 Jan 2018 15:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WgSBtlSb3y/E3wGpBcIj6qhZ2dis68JILby4gelA//0=; b=l2L3lJfJkmNhtXsIw1jBUtrlX8+EV1YaxgFy95DMW33r5ydbP/my5sSaPu4kd0WLk7 gvxGP/7yOFBxpDPqWx7CAGhWigoxbFRA0vLyW0FE1omnpu6e1yOQW+5/Vo27Dh2FxYu8 ATatn/GaJvlkJii/CyKRVc3AbI60hSJxf6HnT5y+oM6VhvbE3Gje8Okmp/cCvGqHfNap KqwikFlxXqRzl/zRSpRTA7lztIZ5e9WFmAyauLRUD4ZkjRqt51OKQICstn5IJRWG2mIC y5tyCXMhUMIGsimySszZW6LhfjocxE4cHaorWKJX1W4NUh2y+mFUsxu3LvHDwB7sN9iU gyrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WgSBtlSb3y/E3wGpBcIj6qhZ2dis68JILby4gelA//0=; b=jxffbK5dLPdj6gTgRepoOfT17Q5fUlVtGeWykLOQ7G0CHxx/9himIQ1ALB7E5JbIaF BGadP/b30KENarwyaynLbGlsCuxcpfYGqE2U7ZPw5y8k6CORPBwXXu5r70GtOyE/fRF2 k8ZAE84QsomOpEvhqktWTOK/XMn61V+gqk2/jNOlczL65b1gtxTCm7MgXwmfvPzZWfjU jEkuTQmfZxU4qizEyhzixD4O+7F3wcai6I4oMjbcF8JC21KddEnQINPdL1DyCnP1SsiD gbu5vzSa0FRSY3mP42KsgO+RNpiTs77VhCCNY+Ayvx15nzf0UJTUTQ4VcR1bhYmSJjqm 2byg== X-Gm-Message-State: AKGB3mKNs06m0rFil4sgRvkU1ar1KFIpBdDq99kFKFi39JC0kpu2K4X9 oCh6HORYkVgbjVAzoKq1Yj9fvrpRWb6+uIGK665YMqCEbgP2b6FmTj+Q3xlWR8dUeSESPAd/IXW OgQZRMnZbPTrcnNWxXTNPRLjMZULUoN2peszZoA1Nz+3hCNFsrl6ay5P16dgHhIBQh/F1HmwJVr fhWT+fu3jliNBT X-Google-Smtp-Source: ACJfBovQGkHKYTbl/G9Vfn1SL/ecCGG5uGPEoplWBt/Yk1JeIFeXh6TaN3SLRneDX4UK5yztvHCrpQ== X-Received: by 10.223.160.149 with SMTP id m21mr14250846wrm.112.1515541681221; Tue, 09 Jan 2018 15:48:01 -0800 (PST) Received: from [192.168.0.3] (ath91-3-88-167-161-184.fbx.proxad.net. [88.167.161.184]) by smtp.gmail.com with ESMTPSA id 127sm18521127wmk.14.2018.01.09.15.48.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 15:48:00 -0800 (PST) Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions To: Tom Lane , Oliver Ford Cc: Erik Rijkers , Pg Hackers References: <2c084c1c2bf599ceb2afa87874de8bc1@xs4all.nl> <13279.1515535159@sss.pgh.pa.us> From: Vik Fearing Organization: 2ndQuadrant France Message-ID: Date: Wed, 10 Jan 2018 00:47:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <13279.1515535159@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/09/2018 10:59 PM, Tom Lane wrote: > Generally speaking, Postgres tries hard to be an extensible-datatype > system, going beyond the SQL standard's minimum requirements when > necessary to make it so. The reason that we don't already have RANGE > PRECEDING/FOLLOWING support is that nobody was satisfied with only > making it work for integers and datetimes. There was, as I recall, code > implementing more or less what you've got here in the original window > function submission, and we pulled it out before committing because of > that inadequacy. I don't think the fact that some years have gone by > means that we should forget about keeping the feature extensible. I'm glad I read the thread before I replied. My biggest complaint I had in my head when reading the initial post was that clamping down on specific datatypes was distinctly non-PostgreSQL-esque. I'm -1 on such a patch, even though I would really like this feature. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support