pub struct UtilityOption {
pub name: Ident,
pub arg: Option<Expr>,
}
Expand description
Represents a single PostgreSQL utility option.
A utility option is a key-value pair where the key is an identifier (IDENT) and the value can be one of the following:
- A number with an optional sign (
+
or-
). Example:+10
,-10.2
,3
- A non-keyword string. Example:
option1
,'option2'
,"option3"
- keyword:
TRUE
,FALSE
,ON
(off
is also accept). - Empty. Example:
ANALYZE
(identifier only)
Utility options are used in various PostgreSQL DDL statements, including statements such as
CLUSTER
, EXPLAIN
, VACUUM
, and REINDEX
. These statements format options as ( option [, ...] )
.
CLUSTER EXPLAIN VACUUM REINDEX
For example, the EXPLAIN
AND VACUUM
statements with options might look like this:
EXPLAIN (ANALYZE, VERBOSE TRUE, FORMAT TEXT) SELECT * FROM my_table;
VACCUM (VERBOSE, ANALYZE ON, PARALLEL 10) my_table;
Fields§
§name: Ident
§arg: Option<Expr>
Trait Implementations§
Source§impl Clone for UtilityOption
impl Clone for UtilityOption
Source§fn clone(&self) -> UtilityOption
fn clone(&self) -> UtilityOption
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UtilityOption
impl Debug for UtilityOption
Source§impl<'de> Deserialize<'de> for UtilityOption
impl<'de> Deserialize<'de> for UtilityOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UtilityOption
impl Display for UtilityOption
Source§impl Hash for UtilityOption
impl Hash for UtilityOption
Source§impl Ord for UtilityOption
impl Ord for UtilityOption
Source§fn cmp(&self, other: &UtilityOption) -> Ordering
fn cmp(&self, other: &UtilityOption) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UtilityOption
impl PartialEq for UtilityOption
Source§impl PartialOrd for UtilityOption
impl PartialOrd for UtilityOption
Source§impl Serialize for UtilityOption
impl Serialize for UtilityOption
Source§impl Visit for UtilityOption
impl Visit for UtilityOption
Source§impl VisitMut for UtilityOption
impl VisitMut for UtilityOption
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
impl Eq for UtilityOption
impl StructuralPartialEq for UtilityOption
Auto Trait Implementations§
impl Freeze for UtilityOption
impl RefUnwindSafe for UtilityOption
impl Send for UtilityOption
impl Sync for UtilityOption
impl Unpin for UtilityOption
impl UnwindSafe for UtilityOption
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)