Comments (5)
That PR is not relevant here, this one is
#11493
Views create dependencies now
from duckdb.
Doesn't requiring the use of
DROP...CASCADE
defeat the purpose ofCREATE OR REPLACE
I don't agree, I just think what is missing here is the option to provide CASCADE
to CREATE OR REPLACE
They control two different intentions
CREATE OR REPLACE indicates your intent to drop the table, it doesn't necessarily indicate your intent to drop the views/indexes/sequences, etc.. that have a dependency on the table
We could argue whether the VIEW should be recreated instead of dropped if CASCADE is provided, but that's a different discussion. I don't think performing a CASCADE implicitly when OR REPLACE is used is the right move
from duckdb.
We could argue whether the VIEW should be recreated instead of dropped if CASCADE is provided, but that's a different discussion. I don't think performing a CASCADE implicitly when OR REPLACE is used is the right move
I do believe that CREATE OR REPLACE
should not be destructive towards downstream dependencies. With or without CASCADE
.
A typical use case for CREATE OR REPLACE
is to atomically refresh the entire table / view without changing the schema and without exposing the clients to partial (empty) data caused by the intermediate table truncation step. Though the argument can be made that this can be achieved by doing these 2 steps as part of a transaction. But this doesn't help with views.
Another use case is to change both data and the schema of the table in a non-descrtuctive way.
The existing behavior renders the latter use cases impossible. Is there a way to disable binding for views and go back to previous behavior?
from duckdb.
This also broke us, for me this is really unexpected. CREATE OR REPLACE
should really not be destructive, and it's heavily breaking
from duckdb.
#12209 adds a new setting for view dependencies (enable_view_dependencies
) which now defaults to false
from duckdb.
Related Issues (20)
- motherduck pivot Invalid Error: PendingQuery can only take a single statement erro HOT 2
- Parquet read : Invalid decimal encoding in Parquet file HOT 2
- DuckDB Build Failure in Alpine Linux Docker Image (host: mac M1) HOT 5
- Incorrect results returned when using JOIN statement HOT 3
- performance of lateral join on timestamp fields
- current_timestamp cannot be used in having clause (Binder Error) HOT 1
- PIVOT should have syntax to GROUP BY no columns
- build error: jemalloc fails due to strerror_r returning char* instead of int HOT 1
- `clang_format` doesn't support Apple Silicon so format-fix doesn't run HOT 2
- Using GROUP BY ALL with a window function causes "Binder Error: Cannot mix aggregates with non-aggregated columns!" HOT 1
- _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT assertion failure HOT 1
- Out of Memory Error: Failed to allocate block of 262144 bytes (bad allocation) HOT 2
- Inconsistent Query Results with GREATEST HOT 1
- Very slow performance for query targeting partitioned parquet files with WHERE clause for values inside another duckdb table
- insert with on conflict fails if column has index
- Unexpected error raised by PRINTF HOT 1
- ERROR: duckdb.duckdb.Error: Failed to execute query "UPDATE HOT 1
- DuckDB.jl `execute` doesn't like non-null terminated strings HOT 1
- NaN behaves erratically HOT 2
- build error for fuction "strerror_r" in extention jemalloc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb.