Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9oap-005KNT-St for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 16:13:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s9oap-0013bf-Lb for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 16:13:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9oap-0013bW-Az for pgsql-general@lists.postgresql.org; Wed, 22 May 2024 16:13:31 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s9oal-000E8y-2b for pgsql-general@lists.postgresql.org; Wed, 22 May 2024 16:13:30 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-6570bd6c3d7so1327654a12.0 for ; Wed, 22 May 2024 09:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716394405; x=1716999205; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RttOKX5FOp8EtygS5268Fu7yIlf0THYrdNg8GEXODY0=; b=Qpcm2/qRy+pnMWBMsJqujSiA+aIAMr2XkHnX3VfJFaKZOXy8OYeWOO1zKdj9XgxpmW Qk8E+joxj0OKndB4VTIu+G1Ql7+N1hncu3Pnvim0BS/cVu3hscRrRf2duqHHlb3/gVSN w6ggmXQMXty7EDBaK7p03liCm6ESkfiImbWofACaQgBujAg6sKTzCZz5EkhOhW/QAaSL KM9gW7cRpTQRAOLuGSVPsysir69qiwwe6US4BmvtYRtzl6FNfNDDYjd4nRR7IQSl5Dc/ EZVyXycN1BQ27VQ1U3TbAqjCSP1i246RKgh8qgsPKkXIzkIUzDHs5d3LFz1rbdMlw2kE UGVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716394405; x=1716999205; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RttOKX5FOp8EtygS5268Fu7yIlf0THYrdNg8GEXODY0=; b=ZfFtgqKxEpK/Y7KO3fYwB7/aGopqn9YYJAmjLWW2cH0ZBIV4cXixQE3ra7aiN91IWa hNuCrYz9G753rTkzQXE3jvnrTOpg6Gi60F8OoaUNtKf3aDBmR/2XhC4HkBg7ToxR0y2E U1Zk8z30VIuXPJnmVzKgHsndpFifjQ2udynLldP1iwxqCYUfPHEUKHmmMrLfvycR31Ky FILaRClgAITDyN3EH3a+uX7RLe7obJ3zdE9AM7J7w9Ca7i4lCO/10+AJsPP8tORpJ5vw wWk54iPxyWvZCOMBGjcbTYODULkO4BnrgNI8/aql4r5IuihVgOqSQewnT45TceaK5ZvM NAaQ== X-Forwarded-Encrypted: i=1; AJvYcCWBh6SQzyEN8S7kCfP6Bs4BPtx37STf3JvAXf1VvKKytfPYNI9z0lam/M/JpaMSbqUfJ7FprBJgn3VeTOvZhu7ywXGR2VR4HFc1Be76+fxlkKLz X-Gm-Message-State: AOJu0YzEnm8KUvShFPCADcmjHr9x43BhMgmqB0y13WxRfFZ/lzrKRXej wHsTArHmLzx6OL/hworEQVvZ8h7Mu2Mt/Ea2hD87vgeQf8F1E3XhjMq5r6YJKk+uZHmb7MYOZ67 fXrN4j79bwnv/mtBuEAxuoPUgKMA= X-Google-Smtp-Source: AGHT+IEWSKgETIIcFQCEwK4UXoC1ZcNwaeQsmqdkxirFhw8FOrB21qcKUe4pmnOlkoem60Y21Qm/laq+RjSNq9KK8zA= X-Received: by 2002:a17:90b:300f:b0:2b4:32ae:8569 with SMTP id 98e67ed59e1d1-2bd9f5c3967mr2415845a91.40.1716394405365; Wed, 22 May 2024 09:13:25 -0700 (PDT) MIME-Version: 1.0 References: <98fd5198e1fe4e162f1166fd0575844de8bb7714.camel@loonybin.net> In-Reply-To: From: Isaac Morland Date: Wed, 22 May 2024 12:13:12 -0400 Message-ID: Subject: Re: Finding "most recent" using daterange To: Greg Sabino Mullane Cc: Rob Foehl , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d3975706190d36ac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d3975706190d36ac Content-Type: text/plain; charset="UTF-8" On Wed, 22 May 2024 at 11:36, Greg Sabino Mullane wrote: > Oh, you are right - NULLS LAST, got my -infinity crossed with my infinity. > :) > NULLS LAST for lower bound, NULLS FIRST for upper bound. The other way around if you were doing an ascending sort. --000000000000d3975706190d36ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 22 May 2024 at 11:36, Greg Sabino= Mullane <htamfids@gmail.com&g= t; wrote:
Oh, you are right - NULLS LAST, got my -infinity crossed with my infin= ity. :)=C2=A0

NULLS LAST for lower bo= und, NULLS FIRST for upper bound.

The other way ar= ound if you were doing an ascending sort.
--000000000000d3975706190d36ac--