pub struct PgClass {Show 24 fields
pub oid: SmolStr,
pub relname: SmolStr,
pub relnamespace: SmolStr,
pub reltype: Option<SmolStr>,
pub reloftype: Option<SmolStr>,
pub relowner: SmolStr,
pub relam: Option<SmolStr>,
pub relisshared: bool,
pub relpersistence: PgClassRelpersistence,
pub relkind: PgClassRelkind,
pub relnatts: u16,
pub relchecks: u16,
pub relrowsecurity: bool,
pub relforcerowsecurity: bool,
pub relreplident: PgClassRelreplident,
pub relispartition: bool,
pub relacl: Option<Vec<AclItem<TableAclPrivilege>>>,
pub reloptions: Option<Vec<SmolStr>>,
pub relpartbound: Option<SmolStr>,
pub description: Option<SmolStr>,
pub seclabel: Option<SmolStr>,
pub seclabel_provider: Option<SmolStr>,
pub initprivs: Option<Vec<AclItem<TableAclPrivilege>>>,
pub initprivs_type: Option<PgClassInitprivsType>,
}Expand description
The DDL-only contents of pg_class
Fields§
§oid: SmolStroid Row identifier
relname: SmolStrname Name of the table, index, view, etc.
relnamespace: SmolStroid (references pg_namespace.oid) The OID of the namespace that contains this relation
reltype: Option<SmolStr>oid (references pg_type.oid) The OID of the data type that corresponds to this table’s row type, if any; zero for indexes, sequences, and toast tables, which have no pg_type entry
reloftype: Option<SmolStr>oid (references pg_type.oid) For typed tables, the OID of the underlying composite type; zero for all other relations
relowner: SmolStroid (references pg_authid.oid) Owner of the relation
relam: Option<SmolStr>oid (references pg_am.oid) The access method used to access this table or index. Not meaningful if the relation is a sequence or has no on-disk file, except for partitioned tables, where, if set, it takes precedence over default_table_access_method when determining the access method to use for partitions created when one is not specified in the creation command.
bool True if this table is shared across all databases in the cluster. Only certain system catalogs (such as pg_database) are shared.
relpersistence: PgClassRelpersistencechar p = permanent table/sequence, u = unlogged table/sequence, t = temporary table/sequence
relkind: PgClassRelkindchar r = ordinary table, i = index, S = sequence, t = TOAST table, v = view, m = materialized view, c = composite type, f = foreign table, p = partitioned table, I = partitioned index
relnatts: u16int2 Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in pg_attribute. See also pg_attribute.attnum.
relchecks: u16int2 Number of CHECK constraints on the table; see pg_constraint catalog
relrowsecurity: boolbool True if table has row-level security enabled; see pg_policy catalog
relforcerowsecurity: boolbool True if row-level security (when enabled) will also apply to table owner; see pg_policy catalog
relreplident: PgClassRelreplidentchar Columns used to form “replica identity” for rows: d = default (primary key, if any), n = nothing, f = all columns, i = index with indisreplident set (same as nothing if the index used has been dropped)
relispartition: boolbool True if table or index is a partition
relacl: Option<Vec<AclItem<TableAclPrivilege>>>aclitem[] Access privileges; see Section 5.8 for details
reloptions: Option<Vec<SmolStr>>text[] Access-method-specific options, as “keyword=value” strings
relpartbound: Option<SmolStr>pg_node_tree If table is a partition (see relispartition), internal representation of the partition bound
description: Option<SmolStr>text The comment from pg_description
seclabel: Option<SmolStr>text The seclabel from pg_seclabel
seclabel_provider: Option<SmolStr>text The provider from pg_seclabel
initprivs: Option<Vec<AclItem<TableAclPrivilege>>>aclitem[] The initial access privileges from pg_init_privs.
initprivs_type: Option<PgClassInitprivsType>char A code defining the type of initial privilege of this object from pg_init_privs. ‘i’ if set by initdb, ‘e’ if set by CREATE EXTENSION.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PgClass
impl<'de> Deserialize<'de> for PgClass
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgClass, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgClass, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Equivalent<PgClass> for SmolStr
impl Equivalent<PgClass> for SmolStr
Source§fn equivalent(&self, key: &PgClass) -> bool
fn equivalent(&self, key: &PgClass) -> bool
key and return true if they are equal.Source§impl Equivalent<PgClass> for str
impl Equivalent<PgClass> for str
Source§fn equivalent(&self, key: &PgClass) -> bool
fn equivalent(&self, key: &PgClass) -> bool
key and return true if they are equal.Source§impl Serialize for PgClass
impl Serialize for PgClass
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for PgClass
impl StructuralPartialEq for PgClass
Auto Trait Implementations§
impl Freeze for PgClass
impl RefUnwindSafe for PgClass
impl Send for PgClass
impl Sync for PgClass
impl Unpin for PgClass
impl UnsafeUnpin for PgClass
impl UnwindSafe for PgClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.