You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7464d2c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sql): refuse per-row sequence accessors instead of returning NULL
nextval/currval/setval only evaluate through SqlCatalog's sequence
state at plan time, in a FROM-less SELECT or a column DEFAULT. A call
over a FROM relation instead reached the row evaluator, which holds no
sequence state and silently returned NULL for every row.
Name the three accessor names once in a shared sequence_accessor
module and use it from both the constant folder and the new resolver
gate. TableScope::is_row_scope and ColumnScope::is_row_scope report
whether an expression sits behind a relation; convert_function_depth
refuses a sequence accessor there with the new
SqlError::SequencePerRowUnsupported.
Wire the refusal through to SQLSTATE 0A000 (feature_not_supported) on
both the plan-error and pgwire error-mapping paths via a new
crate::Error::FeatureNotSupported, and through error_classify for the
native surface.
0 commit comments