-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: cannot store "AS OF SYSTEM TIME" clause in views #50753
Copy link
Copy link
Open
Labels
A-sql-executorSQL txn logicSQL txn logicC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-nostaleMarks an issue/pr that should be ignored by the stale botMarks an issue/pr that should be ignored by the stale bot
Description
Describe the problem
would like to use AOST on reporting side without having to change the application.
To Reproduce
select ycsb_key from usertable as of system time '-1m' limit 1;
create view x as select ycsb_key from usertable as of system time '-1m' limit 1;
ERROR: AS OF SYSTEM TIME must be provided on a top-level statement
SQLSTATE: 42601
Expected behavior
support AOST inside view
Additional data / screenshots
If applicable, add screenshots to help explain your problem.
Environment:
- CockroachDB version 20.1.1
- Server OS: osx
- Client app
cockroach sql
Additional context
changes are required on every SQL that require the use of AOST
related: #96391
Epic CRDB-9838
gz#5693
Jira issue: CRDB-4093
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-executorSQL txn logicSQL txn logicC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries TeamX-nostaleMarks an issue/pr that should be ignored by the stale botMarks an issue/pr that should be ignored by the stale bot
Type
Projects
Status
Backlog