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)
- Window range ending in `0 preceding` invalid result HOT 2
- Query with `row_number()` function hangs HOT 7
- .tables doesn't include catalog/database and schema name
- Catalog Errors only offer one suggestion when multiple suggestions are returned with the same score
- array_agg with ORDER BY does not respect default_collation HOT 2
- Equivalent MACRO definitions yield different results HOT 2
- DROP TABLE IF EXISTS fails with an existing VIEW HOT 2
- Newly imported tables not showing HOT 3
- Date Difference Discrepancy in DuckDB HOT 2
- Change SQL autocompletion function name into a pragma rather than sql_auto_complete
- Using random() in an uncorrelated subquery replicates the result HOT 4
- `USE` does not affect for the table referenced after the keyword ON for the `CREATE UNIQUE INDEX ... ON ...` HOT 1
- For even number of inputs, MEDIAN() does wrong floor/mean behavior for various dtypes HOT 16
- query hangs forever using views, completes immediately with equivalent tables HOT 4
- Conversion Error of a DATE column when reading a file to insert in table HOT 6
- Wrong number of results when calling a MACRO that calls a scalar function HOT 7
- product of unnested array versus not unnested array give very different answers HOT 5
- File protocol not supported HOT 8
- Bad list performance HOT 3
- json_deserialize_sql(): Error: Attempted to dereference unique_ptr that is NULL
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.