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)
- Signal 11 during tests
- CTE with "multiple recursive references" produces incomplete results. HOT 2
- Error when Merging Parquet Files with Nested Structs Containing Different Keys
- `replacement_scan` not working anymore after 1.1.0 HOT 3
- strptime function fails with the error "strptime format must be a constant" when format parameter is not provided as a constant
- Cannot reference user defined type across schemas
- CentOS install error HOT 1
- Cross schema TYPE reference broken HOT 2
- Unexpected values when using alias that happens to be a (joined) column name HOT 8
- Performance issue with SET VARIABLE HOT 5
- `ignore_errors` parameter is causing data loss during `TOO MANY COLUMNS` error type HOT 1
- JSON Import Error: Incorrect Parsing of ISO 8601 Date Strings with 'T' Separator HOT 2
- FROM generate_series(_,_) generates error in CASE statement because of deficient static type checking (generate_series() should probably in any case be more like range()) HOT 5
- Terminal UTF-8 display issues on Windows HOT 4
- Seeing a single value changed after inserting ~1.5million row polars df to duckdb and then querying back out HOT 5
- Unexpected result when casting `TIMESTAMP_S` to `TIME`
- CASE statements in TABLE MACRO HOT 2
- copy with read_csv produces syntax error HOT 3
- CASE checks non-switched expression HOT 1
- When writing geoparquet file from CSV I get malloc: double free for ptr 0x12aaaf600 HOT 7
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.