Re: [HACKERS] GSoC 2017: Foreign Key Arrays
| От | Mark Rofail |
|---|---|
| Тема | Re: [HACKERS] GSoC 2017: Foreign Key Arrays |
| Дата | |
| Msg-id | CAJvoCutySk5ipXo_d_eMS3CH58-rYP87RapboyXnQe5BVWx6JQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [HACKERS] GSoC 2017: Foreign Key Arrays (Mark Rofail <markm.rofail@gmail.com>) |
| Ответы |
Re: [HACKERS] GSoC 2017: Foreign Key Arrays
|
| Список | 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);
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
Вложения
В списке pgsql-hackers по дате отправления: