System Table Compatibility
Besides compatibility with the PostgreSQL SQL dialect and protocol, CedarDB also supports a large
part of the PostgreSQL system table catalog in the pg_catalog
schema.
These system tables contain information about the system state in the form of metadata.
This metadata is often used by external tools and clients to interact with the database system for introspection and
reflection, e.g., to show which tables exist.
This page provides an overview of the currently supported system tables and views.
- đĸ Supported
- đĄ Stubbed for compatibility: These do not contain actual content and exist solely for compatibility purposes, as CedarDB does not share PostgreSQL’s codebase or internal architecture
- đ´ Not yet supported
Additionally, CedarDB exposes information that are not available in PostgreSQL in its CedarDB system tables.
System Tables
System tables provide a raw view into the state of the database system. In contrast to PostgreSQL, system tables in CedarDB are read-only, and can only be indirectly influenced through DDL statements.
System tables often contain many low-level details. For more accessible and friendly access to the same information, consider using the built-in system views, or the SQL-standard information schema.
Feature | Support State | Details |
---|---|---|
pg_aggregate | đĄ | Stores information about aggregate functions. |
pg_am | đĸ | Contains information about access methods; amhandler is unset. |
pg_amop | đĄ | Stores information about operators associated with access methods. |
pg_amproc | đĄ | Contains information about support procedures associated with access methods. |
pg_attrdef | đĸ | Stores column default values. |
pg_attribute | đĸ | Contains information about table columns. |
pg_authid | đĸ | Stores information about database roles. |
pg_auth_members | đĄ | Tracks role memberships. |
pg_cast | đĄ | Contains information about type casts. |
pg_class | đĸ | Stores information about tables, indexes, sequences, and other relations. |
pg_collation | đĸ | Contains information about collations. |
pg_constraint | đĸ | Stores information about table constraints. |
pg_conversion | đĄ | Contains information about encoding conversions. |
pg_database | đĸ | Stores information about databases. |
pg_db_role_setting | đĄ | Contains per-role and per-database configuration settings. |
pg_default_acl | đĄ | Stores default access privileges. |
pg_depend | đĄ | Tracks dependencies between database objects. |
pg_description | đĸ | Stores optional descriptions (comments) for database objects. |
pg_enum | đĄ | Contains information about enum types. |
pg_event_trigger | đĄ | Stores information about event triggers. |
pg_extension | đĄ | Contains information about installed extensions. |
pg_foreign_data_wrapper | đĄ | Stores information about foreign-data wrappers. |
pg_foreign_server | đĄ | Contains information about foreign servers. |
pg_foreign_table | đĄ | Stores information about foreign tables. |
pg_index | đĸ | Contains information about indexes. |
pg_inherits | đĄ | Tracks table inheritance hierarchies. |
pg_init_privs | đĄ | Stores initial privileges of database objects. |
pg_language | đĄ | Contains information about procedural languages. |
pg_largeobject | đĄ | Stores large object data. |
pg_largeobject_metadata | đĄ | Contains metadata for large objects. |
pg_namespace | đĸ | Stores information about schemas. |
pg_opclass | đĸ | Contains information about operator classes. |
pg_operator | đĄ | Stores information about operators. |
pg_opfamily | đĄ | Contains information about operator families. |
pg_parameter_acl | đĄ | Stores access privileges for server parameters. |
pg_partitioned_table | đĄ | Contains information about partitioned tables. |
pg_policy | đĄ | Stores information about row-level security policies. |
pg_proc | đĸ | Contains information about functions and procedures. |
pg_publication | đĄ | Contains all publications created in the database. |
pg_publication_namespace | đĄ | Maps schemas to publications, supporting a many-to-many relationship. |
pg_publication_rel | đĄ | Maps relations (tables) to publications, supporting a many-to-many relationship. |
pg_range | đĄ | Stores information about range types, supplementing entries in pg_type. |
pg_replication_origin | đĄ | Contains all replication origins created, shared across all databases in a cluster. |
pg_rewrite | đĄ | Stores rewrite rules for tables and views. |
pg_seclabel | đĄ | Stores security labels on database objects, manipulable with the SECURITY LABEL command. |
pg_sequence | đĸ | Contains information about sequences, with additional details in pg_class. |
pg_shdepend | đĄ | Records dependency relationships between database objects and shared objects, like roles. |
pg_shdescription | đĄ | Stores optional descriptions (comments) for shared database objects. |
pg_shseclabel | đĄ | Stores security labels for shared database objects. |
pg_statistic | đĄ | Stores statistical data about the contents of the database, used by the query planner. |
pg_statistic_ext | đĄ | Stores extended statistics for columns, aiding in more accurate query planning. |
pg_statistic_ext_data | đĄ | Contains data for extended statistics objects. |
pg_subscription | đĄ | Stores information about logical replication subscriptions. |
pg_subscription_rel | đĄ | Tracks the state of individual relations in a subscription. |
pg_tablespace | đĄ | Stores information about the available tablespaces. |
pg_transform | đĄ | Stores information about transforms between data types and procedural languages. |
pg_trigger | đĄ | Contains information about triggers on tables. |
pg_ts_config | đĄ | Stores text search configurations. |
pg_ts_config_map | đĄ | Maps text search configurations to dictionaries. |
pg_ts_dict | đĄ | Stores text search dictionaries. |
pg_ts_parser | đĄ | Contains text search parsers. |
pg_ts_template | đĄ | Stores text search templates. |
pg_type | đĸ | Stores information about data types. |
pg_user_mapping | đĄ | Contains information about user mappings for foreign data access. |
CedarDB System Tables
CedarDB provides additional information in its system-specific system tables. As the PostgreSQL system tables, those system tables are read-only.
cedardb_compression_info
This system table contains information about how tables and columns are compressed in CedarDB. Note that CedarDB can use different compression schemes within the same column and that this table currently only includes statistics on cold data. For more information on cold and hot data, see this blog post.
Column | Type | Description |
---|---|---|
oid | Integer | The Object Identifier of the table. |
tablename | Text | The name of the table. |
attributename | Text | The name of the attribute. |
datatype | Text | The type of the attribute. |
encoding | Text | The encoding scheme used for compression. |
compressedvaluesize | Text | The maximum number of bytes required to encode a compressed value. For instance, if a dictionary has at most 256 keys, each value can be encoded using just one byte. |
compressedsize | Bigint | The size of the compressed data in bytes. |
uncompressedsize | Bigint | The size of the uncompressed data in bytes. For strings, this includes additional meta data to be able to query the data. |
tuplecount | Bigint | The number of compressed tuples. |
This is an excerpt of the output for TPCH with scale factor 1:
oid tablename attributename datatype encoding compressedvaluesize compressedsize uncompressedsize tuplecount
-----
268435460 partsupp ps_comment text simple dictionary fourbyte 104230496 107284124 768830
268435460 partsupp ps_supplycost numeric truncate fourbyte 3075344 6150640 768830
268435460 partsupp ps_availqty integer truncate twobyte 1537680 3075320 768830
268435460 partsupp ps_suppkey integer truncate twobyte 1537680 3075320 768830
268435460 partsupp tid bigint increment zerobytes 0 6150640 768830
268435460 partsupp ps_partkey integer frameofreference twobyte 1537680 3075320 768830
268435462 orders tid bigint increment zerobytes 0 12000000 1500000
268435462 orders o_clerk char sortedstring dictionary twobyte 3114096 46495400 1500000
268435462 orders o_comment text simple dictionary fourbyte 90643872 96751711 1500000
...
System Views
System views provide convenient access to system information. System tables often contain numeric identifiers, e.g., for the owner of tables. The views instead use more human-readable symbolic names.
Feature | Support State | Details |
---|---|---|
pg_available_extensions | đĄ | Lists available extensions. |
pg_available_extension_versions | đĄ | Shows available versions of extensions. |
pg_backend_memory_contexts | đĄ | Displays memory contexts of the backend. |
pg_config | đ´ | Provides access to compile-time configuration parameters. |
pg_cursors | đ´ | Lists open cursors. |
pg_file_settings | đ´ | Summarizes contents of configuration files. |
pg_group | đĸ | Displays groups of database users. |
pg_hba_file_rules | đ´ | Summarizes client authentication configuration. |
pg_ident_file_mappings | đĄ | Summarizes client user name mapping configuration. |
pg_indexes | đĸ | Shows information about indexes. |
pg_locks | đĄ | Displays locks currently held or awaited. |
pg_matviews | đĄ | Lists materialized views. |
pg_policies | đĄ | Displays information about policies. |
pg_prepared_statements | đĄ | Lists prepared statements. |
pg_prepared_xacts | đ´ | Shows prepared transactions. |
pg_publication_tables | đ´ | Displays publications and their associated tables. |
pg_replication_origin_status | đ´ | Provides information about replication origins, including replication progress. |
pg_replication_slots | đ´ | Displays replication slot information. |
pg_roles | đĸ | Lists database roles. |
pg_rules | đĄ | Shows information about rules. |
pg_seclabels | đĄ | Displays security labels. |
pg_sequences | đĄ | Lists sequences. |
pg_settings | đĸ | Provides access to parameter settings. |
pg_shadow | đĸ | Displays database users. |
pg_shmem_allocations | đĄ | Shows shared memory allocations. |
pg_stats | đ´ | Provides planner statistics. |
pg_stats_ext | đĄ | Displays extended planner statistics. |
pg_stats_ext_exprs | đĄ | Shows extended planner statistics for expressions. |
pg_tables | đĸ | Lists tables. |
pg_timezone_abbrevs | đĸ | Displays time zone abbreviations. |
pg_timezone_names | đĸ | Lists time zone names. |
pg_user | đĸ | Shows database users. |
pg_user_mappings | đĄ | Displays user mappings. |
pg_views | đĸ | Lists views. |
CedarDB System Views
cedardb_compression_infos
This system view gives an easier usable representation of the compression ratio of the entries in the cedardb_compression_info
system table.
Information Schema
The information_schema
is a standardized, cross-database schema that allows portable system introspection.
For compatibility, CedarDB follows
the PostgreSQL Information Schema,
which matches the ISO/IEC 9075-11 standard.
The information schema views are not included in the default search path, so queries on it need to use the fully qualified name:
select * from information_schema.tables;
Table name | Support State | Details |
---|---|---|
information_schema_catalog_name | đĸ | |
administrable_role_authorizations | đĸ | |
applicable_roles | đĸ | |
attributes | đĄ | |
character_sets | đĸ | |
check_constraint_routine_usage | đĄ | |
check_constraints | đĸ | |
collations | đĸ | |
collation_character_set_applicability | đĸ | |
column_column_usage | đĄ | |
column_domain_usage | đĄ | |
column_options | đĄ | |
column_privileges | đĄ | |
column_udt_usage | đĸ | |
columns | đĸ | |
constraint_column_usage | đĸ | |
constraint_table_usage | đĸ | |
data_type_privileges | đĸ | |
domain_constraints | đĄ | |
domain_udt_usage | đĄ | |
domains | đĄ | |
element_types | đĸ | |
enabled_roles | đĸ | |
foreign_data_wrapper_options | đĄ | |
foreign_data_wrappers | đĄ | |
foreign_server_options | đĄ | |
foreign_servers | đĄ | |
foreign_table_options | đĄ | |
foreign_tables | đĄ | |
key_column_usage | đĸ | |
parameters | đĸ | |
referential_constraints | đĸ | |
role_column_grants | đĄ | |
role_routine_grants | đĄ | |
role_table_grants | đĄ | |
role_udt_grants | đĄ | |
role_usage_grants | đĸ | |
routine_column_usage | đĄ | |
routine_privileges | đĄ | |
routine_routine_usage | đĄ | |
routine_sequence_usage | đĄ | |
routine_table_usage | đĄ | |
routines | đĸ | |
schemata | đĸ | |
sequences | đĸ | |
sql_features | đĄ | |
sql_implementation_info | đĄ | |
sql_parts | đĄ | |
sql_sizing | đĄ | |
table_constraints | đĸ | |
table_privileges | đĄ | |
tables | đĸ | |
transforms | đĄ | |
triggered_update_columns | đĄ | |
triggers | đĄ | |
udt_privileges | đĄ | |
usage_privileges | đĄ | |
user_defined_types | đĄ | |
user_mapping_options | đĄ | |
user_mappings | đĄ | |
view_column_usage | đĄ | |
view_routine_usage | đĄ | |
view_table_usage | đĄ | |
views | đĸ |