]> begriffs open source - ai-pg/blob - full-docs/txt/information-schema.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / information-schema.txt
1
2 Chapter 35. The Information Schema
3
4    Table of Contents
5
6    35.1. The Schema
7    35.2. Data Types
8    35.3. information_schema_catalog_name
9    35.4. administrable_role_​authorizations
10    35.5. applicable_roles
11    35.6. attributes
12    35.7. character_sets
13    35.8. check_constraint_routine_usage
14    35.9. check_constraints
15    35.10. collations
16    35.11. collation_character_set_​applicability
17    35.12. column_column_usage
18    35.13. column_domain_usage
19    35.14. column_options
20    35.15. column_privileges
21    35.16. column_udt_usage
22    35.17. columns
23    35.18. constraint_column_usage
24    35.19. constraint_table_usage
25    35.20. data_type_privileges
26    35.21. domain_constraints
27    35.22. domain_udt_usage
28    35.23. domains
29    35.24. element_types
30    35.25. enabled_roles
31    35.26. foreign_data_wrapper_options
32    35.27. foreign_data_wrappers
33    35.28. foreign_server_options
34    35.29. foreign_servers
35    35.30. foreign_table_options
36    35.31. foreign_tables
37    35.32. key_column_usage
38    35.33. parameters
39    35.34. referential_constraints
40    35.35. role_column_grants
41    35.36. role_routine_grants
42    35.37. role_table_grants
43    35.38. role_udt_grants
44    35.39. role_usage_grants
45    35.40. routine_column_usage
46    35.41. routine_privileges
47    35.42. routine_routine_usage
48    35.43. routine_sequence_usage
49    35.44. routine_table_usage
50    35.45. routines
51    35.46. schemata
52    35.47. sequences
53    35.48. sql_features
54    35.49. sql_implementation_info
55    35.50. sql_parts
56    35.51. sql_sizing
57    35.52. table_constraints
58    35.53. table_privileges
59    35.54. tables
60    35.55. transforms
61    35.56. triggered_update_columns
62    35.57. triggers
63    35.58. udt_privileges
64    35.59. usage_privileges
65    35.60. user_defined_types
66    35.61. user_mapping_options
67    35.62. user_mappings
68    35.63. view_column_usage
69    35.64. view_routine_usage
70    35.65. view_table_usage
71    35.66. views
72
73    The information schema consists of a set of views that contain
74    information about the objects defined in the current database. The
75    information schema is defined in the SQL standard and can therefore be
76    expected to be portable and remain stable — unlike the system catalogs,
77    which are specific to PostgreSQL and are modeled after implementation
78    concerns. The information schema views do not, however, contain
79    information about PostgreSQL-specific features; to inquire about those
80    you need to query the system catalogs or other PostgreSQL-specific
81    views.
82
83 Note
84
85    When querying the database for constraint information, it is possible
86    for a standard-compliant query that expects to return one row to return
87    several. This is because the SQL standard requires constraint names to
88    be unique within a schema, but PostgreSQL does not enforce this
89    restriction. PostgreSQL automatically-generated constraint names avoid
90    duplicates in the same schema, but users can specify such duplicate
91    names.
92
93    This problem can appear when querying information schema views such as
94    check_constraint_routine_usage, check_constraints, domain_constraints,
95    and referential_constraints. Some other views have similar issues but
96    contain the table name to help distinguish duplicate rows, e.g.,
97    constraint_column_usage, constraint_table_usage, table_constraints.