pub enum DiscardTarget {
All,
Plans,
Sequences,
Temp,
}Expand description
Target of a DISCARD. PostgreSQL’s DISCARD ALL is defined as a
macro expansion of the other DISCARD variants plus DEALLOCATE ALL, RESET ALL, CLOSE ALL, UNLISTEN *, and
pg_advisory_unlock_all(). The distinction matters because
halephant’s per-connection pool state tracking needs to react to
ALL (clear prepared statements and dirty GUCs) but not to the
narrower forms.
Variants§
All
DISCARD ALL — full session reset. Drops prepared statements
(DEALLOCATE ALL), resets every GUC (RESET ALL), closes cursors,
and drops temp tables. Halephant must clear both its
ServerPrepared tracker and its dirty_vars set on the
affected connection.
Plans
DISCARD PLANS — releases cached query plans only. The
prepared statements themselves remain registered on the
backend; the next Bind will trigger re-planning transparently,
so halephant’s pool state is unaffected.
Sequences
DISCARD SEQUENCES — discards cached sequence-related state.
Has no bearing on halephant’s pool tracking.
Temp
DISCARD TEMPORARY / DISCARD TEMP — drops temp tables. Has
no bearing on halephant’s pool tracking.
Trait Implementations§
Source§impl Clone for DiscardTarget
impl Clone for DiscardTarget
Source§fn clone(&self) -> DiscardTarget
fn clone(&self) -> DiscardTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiscardTarget
impl Debug for DiscardTarget
Source§impl PartialEq for DiscardTarget
impl PartialEq for DiscardTarget
impl Copy for DiscardTarget
impl Eq for DiscardTarget
impl StructuralPartialEq for DiscardTarget
Auto Trait Implementations§
impl Freeze for DiscardTarget
impl RefUnwindSafe for DiscardTarget
impl Send for DiscardTarget
impl Sync for DiscardTarget
impl Unpin for DiscardTarget
impl UnsafeUnpin for DiscardTarget
impl UnwindSafe for DiscardTarget
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§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.