Re: Variable constants ?

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Variable constants ?
Date: 2019-08-16 14:27:42
Message-ID: alpine.LNX.2.20.1908160726350.11183@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 16 Aug 2019, Charles Clavadetscher wrote:

> That would be a range with an empty upper bound. Let's say that the rate
> is valid since 2019-08-14 then the range would look like
> [2019-08-14,)
> A query to find the current rate would look like:
>
> SELECT rate
> FROM labor_rate_mult
> WHERE validity @> CURRENT_DATE;
>
> Here you can find documentation on the range types (cool stuff I believe):
> https://www.postgresql.org/docs/11/rangetypes.html

Charles,

Interesting. Certainly worth considering the next time an application needs
a range of dates.

Regards,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-08-16 14:41:59 Re: slow queries on system tables
Previous Message Tom Lane 2019-08-16 14:25:40 Re: Bad Estimate for complex query with JOINS on subselects and OR in where conditions