Skip to main content

enum_values

Function enum_values 

Source
pub async fn enum_values(
    pool: &PgPool,
    schema: &str,
    table: &str,
    key_column: &str,
    has_comment: bool,
) -> Result<Vec<(String, Option<String>)>>
Expand description

The members of an enum table: its key column, and its comment column when it has one, ordered by key.

Read as a role that may read the table. The connection reads it as itself when it can, which a superuser or an inheriting authenticator always could; a NOINHERIT authenticator can read nothing as itself, so it becomes the first role it can become that holds SELECT on the table, inside a transaction that is then rolled back.