2010-09-20 16:08:53 -04:00
|
|
|
src/tools/findoidjoins/README
|
2000-06-19 10:02:16 -04:00
|
|
|
|
2008-03-21 09:23:29 -04:00
|
|
|
findoidjoins
|
|
|
|
|
============
|
2000-06-19 10:02:16 -04:00
|
|
|
|
2002-09-05 15:57:32 -04:00
|
|
|
This program scans a database and prints oid fields (also reg* fields)
|
2011-04-23 19:33:04 -04:00
|
|
|
and the tables they join to. It is normally used to check the system
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
catalog join relationships (shown below for 9.6devel as of 2016-01-16).
|
2000-06-19 10:02:16 -04:00
|
|
|
|
2011-04-23 19:33:04 -04:00
|
|
|
Historically this has been run against an empty database such as template1,
|
|
|
|
|
but there's a problem with that approach: some of the catalogs are empty
|
|
|
|
|
and so their joining columns won't show up in the output. Current practice
|
|
|
|
|
is to run it against the regression-test database, which populates the
|
|
|
|
|
catalogs in interesting ways.
|
|
|
|
|
|
|
|
|
|
Note that unexpected matches may indicate bogus entries in system tables;
|
|
|
|
|
don't accept a peculiar match without question. In particular, a field
|
|
|
|
|
shown as joining to more than one target table is probably messed up.
|
2016-06-22 17:12:55 -04:00
|
|
|
In 9.6, the *only* fields that should join to more than one target
|
|
|
|
|
table are:
|
|
|
|
|
pg_description.objoid, pg_depend.objid, pg_depend.refobjid,
|
|
|
|
|
pg_shdescription.objoid, pg_shdepend.objid, pg_shdepend.refobjid,
|
|
|
|
|
and pg_init_privs.objoid.
|
2011-04-23 19:33:04 -04:00
|
|
|
(Running make_oidjoins_check is an easy way to spot fields joining to more
|
|
|
|
|
than one table, BTW.)
|
2000-06-19 10:02:16 -04:00
|
|
|
|
|
|
|
|
The shell script make_oidjoins_check converts findoidjoins' output
|
|
|
|
|
into an SQL script that checks for dangling links (entries in an
|
2002-09-05 15:57:32 -04:00
|
|
|
OID or REG* column that don't match any row in the expected table).
|
2011-04-23 19:33:04 -04:00
|
|
|
Note that fields joining to more than one table are NOT processed,
|
|
|
|
|
just reported as linking to more than one table.
|
2000-06-19 10:02:16 -04:00
|
|
|
|
|
|
|
|
The result of make_oidjoins_check should be installed as the "oidjoins"
|
|
|
|
|
regression test. The oidjoins test should be updated after any
|
|
|
|
|
revision in the patterns of cross-links between system tables.
|
2011-04-23 19:33:04 -04:00
|
|
|
(Typically we update it at the end of each development cycle.)
|
2000-06-19 10:02:16 -04:00
|
|
|
|
2016-06-22 17:12:55 -04:00
|
|
|
NOTE: as of 9.6, make_oidjoins_check produces two bogus join checks:
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
|
2005-06-22 22:33:28 -04:00
|
|
|
Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
|
2014-04-16 14:28:59 -04:00
|
|
|
These are artifacts and should not be added to the oidjoins regression test.
|
2008-10-13 08:59:57 -04:00
|
|
|
You might also get output for pg_shdepend.refobjid and pg_shdescription.objoid,
|
2014-04-16 14:28:59 -04:00
|
|
|
neither of which should be added to the regression test.
|
2001-02-09 22:57:42 -05:00
|
|
|
|
2000-06-19 10:02:16 -04:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggfnoid => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggtransfn => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggfinalfn => pg_catalog.pg_proc.oid
|
2016-06-22 17:12:55 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggcombinefn => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggserialfn => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggdeserialfn => pg_catalog.pg_proc.oid
|
2014-04-16 14:28:59 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggmtransfn => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggminvtransfn => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_aggregate.aggmfinalfn => pg_catalog.pg_proc.oid
|
2005-06-22 22:33:28 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggsortop => pg_catalog.pg_operator.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggtranstype => pg_catalog.pg_type.oid
|
2014-04-16 14:28:59 -04:00
|
|
|
Join pg_catalog.pg_aggregate.aggmtranstype => pg_catalog.pg_type.oid
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
Join pg_catalog.pg_am.amhandler => pg_catalog.pg_proc.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_amop.amopfamily => pg_catalog.pg_opfamily.oid
|
|
|
|
|
Join pg_catalog.pg_amop.amoplefttype => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_amop.amoprighttype => pg_catalog.pg_type.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_amop.amopopr => pg_catalog.pg_operator.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_amop.amopmethod => pg_catalog.pg_am.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_amop.amopsortfamily => pg_catalog.pg_opfamily.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_amproc.amprocfamily => pg_catalog.pg_opfamily.oid
|
|
|
|
|
Join pg_catalog.pg_amproc.amproclefttype => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_amproc.amprocrighttype => pg_catalog.pg_type.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_amproc.amproc => pg_catalog.pg_proc.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_attrdef.adrelid => pg_catalog.pg_class.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_attribute.attrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_attribute.atttypid => pg_catalog.pg_type.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_attribute.attcollation => pg_catalog.pg_collation.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_cast.castsource => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_cast.casttarget => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_cast.castfunc => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_class.relnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_class.reltype => pg_catalog.pg_type.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_class.reloftype => pg_catalog.pg_type.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_class.relowner => pg_catalog.pg_authid.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_class.relam => pg_catalog.pg_am.oid
|
2004-08-04 16:33:49 -04:00
|
|
|
Join pg_catalog.pg_class.reltablespace => pg_catalog.pg_tablespace.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_class.reltoastrelid => pg_catalog.pg_class.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_collation.collnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_collation.collowner => pg_catalog.pg_authid.oid
|
2003-10-19 18:15:32 -04:00
|
|
|
Join pg_catalog.pg_constraint.connamespace => pg_catalog.pg_namespace.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_constraint.conrelid => pg_catalog.pg_class.oid
|
2003-10-19 18:15:32 -04:00
|
|
|
Join pg_catalog.pg_constraint.contypid => pg_catalog.pg_type.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_constraint.conindid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_constraint.confrelid => pg_catalog.pg_class.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_conversion.connamespace => pg_catalog.pg_namespace.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_conversion.conowner => pg_catalog.pg_authid.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_conversion.conproc => pg_catalog.pg_proc.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_database.datdba => pg_catalog.pg_authid.oid
|
2004-08-04 16:33:49 -04:00
|
|
|
Join pg_catalog.pg_database.dattablespace => pg_catalog.pg_tablespace.oid
|
2010-03-13 23:17:54 -05:00
|
|
|
Join pg_catalog.pg_db_role_setting.setdatabase => pg_catalog.pg_database.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_depend.classid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_depend.refclassid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_description.classoid => pg_catalog.pg_class.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_enum.enumtypid => pg_catalog.pg_type.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_extension.extowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_extension.extnamespace => pg_catalog.pg_namespace.oid
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
Join pg_catalog.pg_foreign_data_wrapper.fdwowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_foreign_server.srvowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_foreign_server.srvfdw => pg_catalog.pg_foreign_data_wrapper.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_index.indexrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_index.indrelid => pg_catalog.pg_class.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_inherits.inhrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_inherits.inhparent => pg_catalog.pg_class.oid
|
2016-06-22 17:12:55 -04:00
|
|
|
Join pg_catalog.pg_init_privs.classoid => pg_catalog.pg_class.oid
|
Support arrays of composite types, including the rowtypes of regular tables
and views (but not system catalogs, nor sequences or toast tables). Get rid
of the hardwired convention that a type's array type is named exactly "_type",
instead using a new column pg_type.typarray to provide the linkage. (It still
will be named "_type", though, except in odd corner cases such as
maximum-length type names.)
Along the way, make tracking of owner and schema dependencies for types more
uniform: a type directly created by the user has these dependencies, while a
table rowtype or auto-generated array type does not have them, but depends on
its parent object instead.
David Fetter, Andrew Dunstan, Tom Lane
2007-05-11 13:57:14 -04:00
|
|
|
Join pg_catalog.pg_language.lanowner => pg_catalog.pg_authid.oid
|
2010-03-13 23:17:54 -05:00
|
|
|
Join pg_catalog.pg_language.lanplcallfoid => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_language.laninline => pg_catalog.pg_proc.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_language.lanvalidator => pg_catalog.pg_proc.oid
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
Join pg_catalog.pg_largeobject.loid => pg_catalog.pg_largeobject_metadata.oid
|
|
|
|
|
Join pg_catalog.pg_largeobject_metadata.lomowner => pg_catalog.pg_authid.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_namespace.nspowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_opclass.opcmethod => pg_catalog.pg_am.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_opclass.opcnamespace => pg_catalog.pg_namespace.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_opclass.opcowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_opclass.opcfamily => pg_catalog.pg_opfamily.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_opclass.opcintype => pg_catalog.pg_type.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_opclass.opckeytype => pg_catalog.pg_type.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_operator.oprnamespace => pg_catalog.pg_namespace.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_operator.oprowner => pg_catalog.pg_authid.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_operator.oprleft => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprright => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprresult => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprcom => pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprnegate => pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprcode => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprrest => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_operator.oprjoin => pg_catalog.pg_proc.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_opfamily.opfmethod => pg_catalog.pg_am.oid
|
|
|
|
|
Join pg_catalog.pg_opfamily.opfnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_opfamily.opfowner => pg_catalog.pg_authid.oid
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
Join pg_catalog.pg_policy.polrelid => pg_catalog.pg_class.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_proc.pronamespace => pg_catalog.pg_namespace.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_proc.proowner => pg_catalog.pg_authid.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_proc.prolang => pg_catalog.pg_language.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_proc.provariadic => pg_catalog.pg_type.oid
|
2011-11-14 20:28:38 -05:00
|
|
|
Join pg_catalog.pg_proc.protransform => pg_catalog.pg_proc.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_proc.prorettype => pg_catalog.pg_type.oid
|
2011-11-14 20:28:38 -05:00
|
|
|
Join pg_catalog.pg_range.rngtypid => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_range.rngsubtype => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_range.rngcollation => pg_catalog.pg_collation.oid
|
|
|
|
|
Join pg_catalog.pg_range.rngsubopc => pg_catalog.pg_opclass.oid
|
|
|
|
|
Join pg_catalog.pg_range.rngcanonical => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_range.rngsubdiff => pg_catalog.pg_proc.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_rewrite.ev_class => pg_catalog.pg_class.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_shdepend.refclassid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_shdescription.classoid => pg_catalog.pg_class.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_statistic.starelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_statistic.staop1 => pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_statistic.staop2 => pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_statistic.staop3 => pg_catalog.pg_operator.oid
|
2014-04-16 14:28:59 -04:00
|
|
|
Join pg_catalog.pg_statistic.staop4 => pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_statistic.staop5 => pg_catalog.pg_operator.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_tablespace.spcowner => pg_catalog.pg_authid.oid
|
Restructure index access method API to hide most of it at the C level.
This patch reduces pg_am to just two columns, a name and a handler
function. All the data formerly obtained from pg_am is now provided
in a C struct returned by the handler function. This is similar to
the designs we've adopted for FDWs and tablesample methods. There
are multiple advantages. For one, the index AM's support functions
are now simple C functions, making them faster to call and much less
error-prone, since the C compiler can now check function signatures.
For another, this will make it far more practical to define index access
methods in installable extensions.
A disadvantage is that SQL-level code can no longer see attributes
of index AMs; in particular, some of the crosschecks in the opr_sanity
regression test are no longer possible from SQL. We've addressed that
by adding a facility for the index AM to perform such checks instead.
(Much more could be done in that line, but for now we're content if the
amvalidate functions more or less replace what opr_sanity used to do.)
We might also want to expose some sort of reporting functionality, but
this patch doesn't do that.
Alexander Korotkov, reviewed by Petr Jelínek, and rather heavily
editorialized on by me.
2016-01-17 19:36:59 -05:00
|
|
|
Join pg_catalog.pg_transform.trftype => pg_catalog.pg_type.oid
|
|
|
|
|
Join pg_catalog.pg_transform.trflang => pg_catalog.pg_language.oid
|
|
|
|
|
Join pg_catalog.pg_transform.trffromsql => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_transform.trftosql => pg_catalog.pg_proc.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_trigger.tgrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_trigger.tgfoid => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_trigger.tgconstrrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_trigger.tgconstrindid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_trigger.tgconstraint => pg_catalog.pg_constraint.oid
|
2008-10-13 08:59:57 -04:00
|
|
|
Join pg_catalog.pg_ts_config.cfgnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_ts_config.cfgowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_ts_config.cfgparser => pg_catalog.pg_ts_parser.oid
|
|
|
|
|
Join pg_catalog.pg_ts_config_map.mapcfg => pg_catalog.pg_ts_config.oid
|
|
|
|
|
Join pg_catalog.pg_ts_config_map.mapdict => pg_catalog.pg_ts_dict.oid
|
|
|
|
|
Join pg_catalog.pg_ts_dict.dictnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_ts_dict.dictowner => pg_catalog.pg_authid.oid
|
|
|
|
|
Join pg_catalog.pg_ts_dict.dicttemplate => pg_catalog.pg_ts_template.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prsnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prsstart => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prstoken => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prsend => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prsheadline => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_parser.prslextype => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_template.tmplnamespace => pg_catalog.pg_namespace.oid
|
|
|
|
|
Join pg_catalog.pg_ts_template.tmplinit => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_ts_template.tmpllexize => pg_catalog.pg_proc.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_type.typnamespace => pg_catalog.pg_namespace.oid
|
2006-12-22 19:43:13 -05:00
|
|
|
Join pg_catalog.pg_type.typowner => pg_catalog.pg_authid.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_type.typrelid => pg_catalog.pg_class.oid
|
|
|
|
|
Join pg_catalog.pg_type.typelem => pg_catalog.pg_type.oid
|
Support arrays of composite types, including the rowtypes of regular tables
and views (but not system catalogs, nor sequences or toast tables). Get rid
of the hardwired convention that a type's array type is named exactly "_type",
instead using a new column pg_type.typarray to provide the linkage. (It still
will be named "_type", though, except in odd corner cases such as
maximum-length type names.)
Along the way, make tracking of owner and schema dependencies for types more
uniform: a type directly created by the user has these dependencies, while a
table rowtype or auto-generated array type does not have them, but depends on
its parent object instead.
David Fetter, Andrew Dunstan, Tom Lane
2007-05-11 13:57:14 -04:00
|
|
|
Join pg_catalog.pg_type.typarray => pg_catalog.pg_type.oid
|
2002-09-05 15:57:32 -04:00
|
|
|
Join pg_catalog.pg_type.typinput => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_type.typoutput => pg_catalog.pg_proc.oid
|
2003-10-19 18:15:32 -04:00
|
|
|
Join pg_catalog.pg_type.typreceive => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_type.typsend => pg_catalog.pg_proc.oid
|
2006-12-30 16:21:56 -05:00
|
|
|
Join pg_catalog.pg_type.typmodin => pg_catalog.pg_proc.oid
|
|
|
|
|
Join pg_catalog.pg_type.typmodout => pg_catalog.pg_proc.oid
|
2008-10-13 08:59:57 -04:00
|
|
|
Join pg_catalog.pg_type.typanalyze => pg_catalog.pg_proc.oid
|
2003-10-19 18:15:32 -04:00
|
|
|
Join pg_catalog.pg_type.typbasetype => pg_catalog.pg_type.oid
|
2011-04-23 14:49:54 -04:00
|
|
|
Join pg_catalog.pg_type.typcollation => pg_catalog.pg_collation.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_constraint.conpfeqop []=> pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_constraint.conppeqop []=> pg_catalog.pg_operator.oid
|
|
|
|
|
Join pg_catalog.pg_constraint.conffeqop []=> pg_catalog.pg_operator.oid
|
2011-11-14 20:28:38 -05:00
|
|
|
Join pg_catalog.pg_constraint.conexclop []=> pg_catalog.pg_operator.oid
|
2011-04-23 19:33:04 -04:00
|
|
|
Join pg_catalog.pg_proc.proallargtypes []=> pg_catalog.pg_type.oid
|
2000-06-19 10:02:16 -04:00
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
2011-04-23 14:49:54 -04:00
|
|
|
Bruce Momjian (bruce@momjian.us)
|
2002-09-05 15:57:32 -04:00
|
|
|
Updated for 7.3 by Joe Conway (mail@joeconway.com)
|