Re: [HACKERS] GSoC 2017: Foreign Key Arrays
От | Robert Haas |
---|---|
Тема | Re: [HACKERS] GSoC 2017: Foreign Key Arrays |
Дата | |
Msg-id | CA+Tgmobk7vsBkEPeD839FdqNhwAMkP3rYdyHdbBX1zBxWN1iRQ@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] GSoC 2017: Foreign Key Arrays (Mark Rofail <markm.rofail@gmail.com>) |
Ответы |
Re: [HACKERS] GSoC 2017: Foreign Key Arrays
|
Список | pgsql-hackers |
On Mon, May 22, 2017 at 7:51 PM, Mark Rofail <markm.rofail@gmail.com> wrote: > Cloned the git repo found @ https://github.com/postgres/postgres and > identified the main two files I will be concerned with. (I know I may need > to edit other files but these seem to where I will spend most of my summer) > > src/backend/commands/tablecmds.c > src/backend/utils/ri_triggers.c > > I am yet to identify the files concerned with the GIN opclass. <-- if anyone > can help with this There's not only one GIN opclass. You can get a list like this: select oid, * from pg_opclass where opcmethod = 2742; Actually, you probably want to look for GIN opfamilies: rhaas=# select oid, * from pg_opfamily where opfmethod = 2742;oid | opfmethod | opfname | opfnamespace | opfowner ------+-----------+----------------+--------------+----------2745 | 2742 | array_ops | 11 | 103659| 2742 | tsvector_ops | 11 | 104036 | 2742 | jsonb_ops | 11 | 104037| 2742 | jsonb_path_ops | 11 | 10 (4 rows) To see which SQL functions are used to implement a particular opfamily, use the OID from the previous step in a query like this: rhaas=# select prosrc from pg_amop, pg_operator, pg_proc where amopfamily = 2745 and amopopr = pg_operator.oid and oprcode = pg_proc.oid; prosrc ----------------array_eqarrayoverlaparraycontainsarraycontained (4 rows) Then, you can look for those in the source tree. You can also search for the associated support functions, e.g.: rhaas=# select distinct amprocnum, prosrc from pg_amproc, pg_proc where amprocfamily = 2745 and amproc = pg_proc.oid order by 1, 2;amprocnum | prosrc -----------+----------------------- 1 | bitcmp 1 | bpcharcmp 1 | btabstimecmp 1 | btboolcmp 1 | btcharcmp 1 | btfloat4cmp 1 | btfloat8cmp 1 | btint2cmp 1 | btint4cmp 1 | btint8cmp 1 | btnamecmp 1 | btoidcmp 1 | btoidvectorcmp 1 | btreltimecmp 1 | bttextcmp 1 | bttintervalcmp 1 | byteacmp 1 | cash_cmp 1 | date_cmp 1 | interval_cmp 1 | macaddr_cmp 1 | network_cmp 1 | numeric_cmp 1 | time_cmp 1 | timestamp_cmp 1| timetz_cmp 2 | ginarrayextract 3 | ginqueryarrayextract 4 | ginarrayconsistent 6 | ginarraytriconsistent (30 rows) You might want to read https://www.postgresql.org/docs/devel/static/xindex.html -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: