Re: SQL:2011 PERIODS vs Postgres Ranges?

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>
Subject: Re: SQL:2011 PERIODS vs Postgres Ranges?
Date: 2019-08-02 20:48:31
Message-ID: CALtqXTcfVNbWfRKQKiEsKy-F0yQFzqwA+gHf_c6UrxVEa3YvMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Paul,
I did some clean-up on this patch. I have also refactored a small portion
of the code
to reduce the footprint of the patch. For simplicity, I have divided the
patch into 6
patches, now it is easy to review and debug.

001_temporal_table_grammer_v006.patch

002_temporal_table_doc_v006.patch

003_temporal_table_backend_v006.patch

004_temporal_table_pgdump_v006.patch

005_temporal_table_regression_v006.patch

006_temporal_table_psql_v006.patch

Please follow the PostgreSQL coding guidelines. I have found places where
you missed that, secondly code even in WIP stage must not have WARNING
because it looks ugly.

On Sat, Aug 3, 2019 at 1:29 AM Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> wrote:

> The patch does not work.
>
> postgres=# CREATE TABLE foo (id int,r int4range, valid_at tsrange,
> CONSTRAINT bar_pk PRIMARY KEY (r, valid_at WITHOUT OVERLAPS));
> CREATE TABLE
> postgres=# CREATE TABLE bar (id int,r int4range, valid_at tsrange,
> CONSTRAINT bar_fk FOREIGN KEY (r, PERIOD valid_at) REFERENCES foo);
> ERROR: cache lookup failed for type 0
>
> The new status of this patch is: Waiting on Author
>

--
Ibrar Ahmed

Attachment Content-Type Size
006_temporal_table_psql_v006.patch application/octet-stream 506 bytes
005_temporal_table_regression_v006.patch application/octet-stream 33.2 KB
004_temporal_table_pgdump_v006.patch application/octet-stream 6.0 KB
002_temporal_table_doc_v006.patch application/octet-stream 8.4 KB
003_temporal_table_backend_v006.patch application/octet-stream 64.4 KB
001_temporal_table_grammer_v006.patch application/octet-stream 6.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-08-02 20:49:33 Re: The unused_oids script should have a reminder to use the 8000-8999 OID range
Previous Message Tom Lane 2019-08-02 20:43:06 Re: Optimize single tuple fetch from nbtree index