pub enum Rel {
Show 14 variants
Class,
Namespace,
Attribute,
Type,
Database,
Am,
Attrdef,
Collation,
Inherits,
Policy,
Publication,
PublicationNamespace,
PublicationRel,
StatisticExt,
}Expand description
One relation of the emulated catalogue.
Variants§
Class
Namespace
Attribute
Type
Database
Am
The relations below have columns and no rows: a read model has no such object, and a query that joins one is answered with the no rows that is the truth rather than refused.
Attrdef
Collation
Inherits
Policy
Publication
PublicationNamespace
PublicationRel
StatisticExt
Implementations§
Source§impl Rel
impl Rel
pub fn name(self) -> &'static str
Sourcepub fn columns(self) -> &'static [(&'static str, SqlTy, bool)]
pub fn columns(self) -> &'static [(&'static str, SqlTy, bool)]
The columns, in pg_catalog’s own order and spelling.
An oid-shaped column is SqlTy::Bigint rather than a type of its own: PostgreSQL’s
oid is a 32-bit unsigned integer, every comparison psql writes against one is against a
decimal literal, and a fifth SQL type would have to be a type OID a driver knows.
A "char" column — relkind, relpersistence, attidentity — is SqlTy::Text of one
character, which is what it compares as.
Sourcepub fn missing(name: &str) -> String
pub fn missing(name: &str) -> String
What a client is told when it names a pg_catalog relation that is not here.
By name, and with the list, because the alternative — an empty answer — is a client that
believes the program has no functions rather than one that knows this catalogue has no
pg_proc.