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 1lyLbe-0007wL-T9 for pgsql-general@arkaria.postgresql.org; Tue, 29 Jun 2021 21:49:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lyLbc-0001lz-KV for pgsql-general@arkaria.postgresql.org; Tue, 29 Jun 2021 21:49:20 +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 1lyLbc-0001lr-BP for pgsql-general@lists.postgresql.org; Tue, 29 Jun 2021 21:49:20 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyLbZ-0003um-St for pgsql-general@postgresql.org; Tue, 29 Jun 2021 21:49:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7C2DA5C025E; Tue, 29 Jun 2021 17:49:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 29 Jun 2021 17:49:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=B TDWwCP4Q5ew9zmTQYjBCmCSYbDVKxXlN6c+BZP85NM=; b=cIxlnDkbEL8FooQjo pgHuKaoN6o1h/J+mHB3dzIEZbeFigWjevYlJku5EcDgrC+zTEjSwTxWBC1vHteiW Nx/fU7s4Lmc5vNp/iYggX/HIMIAxYAuIPHqhED2WBXDr2sKWkfoIecoAKIKVx869 ar5xzzaXYeBpAVTRn1z95Rxu05ggrBOYxbvCuBU7+9Nvu0OmC4AFg9Gjq7Lmxo7+ WaJxYkgHtm1OWbDotsPPcGztQv0dSD/UZpLQHkgQ+SStF2mnbJM/gOf+IMhmFwWs aKN3ennzHXXMELfJwSbaIh2PV8KWJzeWMbnog9FJDZcXJzFbT27Fc2fD3I1GnyTQ 1FF2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=BTDWwCP4Q5ew9zmTQYjBCmCSYbDVKxXlN6c+BZP85 NM=; b=siCXznqEH3k/I7IF7XwwhiofOQwzRixGhjOu178rDuKCDftaOuOXoMnbE EhJPMaJb4Jm7dShE04g+BDwm0BryOz9kQfkcW/Wm3GmgnJ5gQkI5fQT1wQ+s5Fjt zsazfKDxJgFhvIi2dl07Mg9x+5FggPoQJzJNSCjIxlGGZCGRdODNdqnJI0Zl5hwY lfzPCpIYc0sTYvHlXpvf9FPRGq64yHnb/1gbrWEBUf4waHufm4HA333IrFld6MP0 THBvdlC3o67v5iIgPONg48eFk+oRfpsh6UAreWo6RtxA3jWnyv+Mo1dxtaIQ+csZ kbxCX5Sx+QUhhUx3kI8F0l7B2Zfew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeiuddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Jun 2021 17:49:15 -0400 (EDT) Subject: Re: Overlapping timestamptz ranges with priority To: Ray O'Donnell , 'PostgreSQL' References: <726445f7-ff72-9412-2e6d-2badcc58f17e@rodonnell.ie> <1e0d9920-49ef-5880-0f37-26594acdc175@aklaver.com> <8d6a1323-1214-1f54-4c5c-3dde6c346e54@rodonnell.ie> <82200976-89c0-43db-3098-f215e980c1c4@aklaver.com> <4244dbae-6387-0d3c-0862-c4c72e71af3c@rodonnell.ie> <5ae0e40a-0d60-3c96-7b63-0856077a8307@aklaver.com> <52feb418-35fc-5ed0-5c4a-43a9ddbfd21a@rodonnell.ie> From: Adrian Klaver Message-ID: <5e7b07f6-5bc7-a0e7-86af-04a63c117764@aklaver.com> Date: Tue, 29 Jun 2021 14:49:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <52feb418-35fc-5ed0-5c4a-43a9ddbfd21a@rodonnell.ie> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/29/21 2:30 PM, Ray O'Donnell wrote: > On 29/06/2021 22:10, Adrian Klaver wrote: >> >> The queued bookings are for a particular aircraft or a particular time >> slot? > > They're for an aircraft. On the old system, they could only be for a > slot - so if someone had booked, say, a two-hour slot, then anyone > queued behind them could only queue for the same two hours. I'd like to > make the new system more flexible, hence the potentially overlapping > ranges. If I'm following correctly then: 1) Under old system there where preset two hour slots over a day period, where the period was say 8:00 to 16:00 2) You now want to allow user defined two hour slots over the same period, where a slot can't start before 8:00 or end after 16:00. 3) First to file gets the slot. 4) Because of turn around considerations a user can't pick up the remaining hour of an overlap. As example in the case of time slots of 10:00 - 12:00 and 11:00 - 13:00 for a particular plane where the second slot was the later one filed the user can't get 12:00 - 13:00. > > Ray. > -- Adrian Klaver adrian.klaver@aklaver.com