Re: [HACKERS] GSoC 2017: Foreign Key Arrays

From: Mark Rofail <markm(dot)rofail(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, David Steele <david(at)pgmasters(dot)net>, Erik Rijkers <er(at)xs4all(dot)nl>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joel Jacobson <joel(at)compiler(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date: 2021-02-07 14:10:28
Message-ID: CAJvoCutySk5ipXo_d_eMS3CH58-rYP87RapboyXnQe5BVWx6JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

Changelog (operator patch):
> - v1 (compatible with current master 2021-02-05,
> commit c444472af5c202067a9ecb0ff8df7370fb1ea8f4)
> * add tests and documentation to array operators and gin index
>
Since we agreed to separate @>> and <<@ operators to prerequisite patch to
the FK Arrays, I have rebased the patch to be applied on
"anyarray_anyelement_operators-vX.patch"

Changelog (FK Arrays)
- v1 (compatible with anyarray_anyelement_operators-v1.patch)
* rebase on anyarray_anyelement_operators-v1.patch
* support coercion
* support vectors instead of arrays

Showcase the Vector usage:
```sql
CREATE TABLE FKTABLEFORARRAY ( ftest1 int2vector,
ftest2 int PRIMARY KEY,
FOREIGN KEY (EACH ELEMENT OF ftest1) REFERENCES PKTABLEFORARRAY
ON DELETE NO ACTION ON UPDATE NO ACTION);
CREATE INDEX ON FKTABLEFORARRAY USING gin (ftest1 array_ops);

-- Populate Table
INSERT INTO FKTABLEFORARRAY VALUES ('5', 1);
INSERT INTO FKTABLEFORARRAY VALUES ('3 2', 2);
INSERT INTO FKTABLEFORARRAY VALUES ('3 5 2 5', 3);
```

/Mark

>

Attachment Content-Type Size
fk_arrays_elem_v1.patch text/x-patch 125.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2021-02-07 14:50:14 Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Previous Message Dilip Kumar 2021-02-07 13:57:02 Re: Is Recovery actually paused?