⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 12 for conflict (0.002 sec.)
INSERT Statement 14362
The INSERT statement inserts new data into a table. Examples Insert the values 1, 2, 3 into tbl : INSERT INTO tbl VALUES (1), (2), (3); Insert the result of a query into a table: INSERT INTO tbl SELECT * FROM other_tbl; Insert values into t ... a column: INSERT INTO tbl (i) VALUES (1), (DEFAULT), (3); Assuming tbl has a primary key/unique constraint, do nothing on conflict: INSERT OR IGNORE INTO tbl (i) VALUES (1); Or update the table with the new values instead: INSERT OR REPLACE INTO tbl (i) ... e table, an error will occur. Columns that are missing from the SELECT statement will be filled with the default value. ON CONFLICT Clause An ON CONFLICT clause can be used to perform a certain action on conflicts that arise from UNIQUE or PRIMARY KEY co ... nstraints. An example for such a conflict is shown in the following example: CREATE TABLE tbl (i INTEGER PRIMARY KEY, j INTEGER); INSERT INTO tbl VALUES (1, 42); IN ...
https://man.mtool.work/duckdb/2.0/sql/statements/insert.html
Concurrency 10170
Handling Concurrency Single Process In in-process mode, DuckDB has two configurable options for concurrency: Read-write mode: one process can both read and write to the database. Read-only mode: multiple processes can read from the database ... rocess DuckDB supports concurrency within a single process according to the following rules. As long as there are no write conflicts, multiple concurrent writes will succeed. Appends will never conflict, even on the same table. Multiple threads can also ... update or delete) the same row at the same time. In that situation, the second thread to attempt the edit will fail with a conflict error. Multiple Processes Writing to DuckDB's native database format from multiple processes is supported through the Quac ... up read query processing. As a result any transactions that modify the same rows at the same time will cause a transaction conflict error: Transaction conflict: cannot update a table that has been altered! Tip A common workaround when a transaction confl ...
https://man.mtool.work/duckdb/2.0/connect/concurrency.html
Friendly SQL 8613
DuckDB offers several advanced SQL features and syntactic sugar to make SQL queries more concise. We refer to these colloquially as “friendly SQL”. Several of these features were first introduced by DuckDB, while some are inspired by other ... tement allows using column names instead of positions. INSERT OR IGNORE INTO ... : insert the rows that do not result in a conflict due to UNIQUE or PRIMARY KEY constraints. INSERT OR REPLACE INTO ... : insert the rows that do not result in a conflict du ... e to UNIQUE or PRIMARY KEY constraints. For those that result in a conflict, replace the columns of the existing row to the new values of the to-be-inserted row. Describing tables and computing stat ...
https://man.mtool.work/duckdb/2.0/sql/dialect/friendly_sql.html
CREATE TRIGGER Statement 8419
New The CREATE TRIGGER feature was introduced in DuckDB 2.0. The CREATE TRIGGER statement registers a trigger: a set of SQL statements that run automatically in response to INSERT , UPDATE , or DELETE events on a table. Examples Record ever ... res a base table. Temporary triggers are not supported. MERGE INTO is not supported on tables with triggers. INSERT ... ON CONFLICT , INSERT OR REPLACE and INSERT OR IGNORE are executed as a merge and therefore fail on tables with UPDATE or DELETE trigge ... rs. ON CONFLICT is not yet supported on tables with FOR EACH ROW triggers. FOR EACH ROW and FOR EACH STATEMENT triggers cannot be mixed fo ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_trigger.html
Keywords and Identifiers 8313
Identifiers Similarly to other SQL dialects and programming languages, identifiers in DuckDB's SQL are subject to several rules. Unquoted identifiers need to conform to a number of rules: They must not be a reserved keyword (see duckdb_keyw ... still uses double quotes. Deduplicating Identifiers In some cases, duplicate identifiers can occur, e.g., column names may conflict when unnesting a nested data structure. In these cases, DuckDB automatically deduplicates column names by renaming them ac ... CT {'key1': 1} = {'KEY1': 1} AS equal; true SELECT union_value(key1 := 1) = union_value(KEY1 := 1) as equal; true Handling Conflicts In case of a conflict, when the same identifier is spelt with different cases, one will be selected randomly. For example ...
https://man.mtool.work/duckdb/2.0/sql/dialect/keywords_and_identifiers.html
Appender 8260
Use an appender to insert rows that your Python code produces. It collects rows and writes them together in one SQL statement; this is called flushing. The with block below flushes on successful exit: import duckdb con = duckdb.connect() co ... INSERT OR REPLACE , so the table needs exactly one primary key or unique constraint. It takes columns like an insert; on a conflict, only the listed columns change. update matches rows on the key columns and sets every other appended column. Use columns ... get", 4) appender.append_row("widget", 2) appender.flush() The statement is one INSERT (including INSERT OR REPLACE and ON CONFLICT ), UPDATE , DELETE or MERGE INTO . A type is anything the Types API accepts, such as "INTEGER" , duckdb.sqltypes.INTEGER o ...
https://man.mtool.work/duckdb/2.0/clients/python/appender.html
Multiple Connections 8207
For tests whose purpose is to verify that the transactional management or versioning of data works correctly, it is generally necessary to use multiple connections. For example, if we want to verify that the creation of tables is correctly ... n unpredictable – as multiple clients can hammer the database at the same time we might end up with (expected) transaction conflicts. statement maybe can be used to deal with these situations. statement maybe essentially accepts both a success, and a fai ... t maybe CREATE OR REPLACE TABLE t2 AS (SELECT -54124033386577348004002656426531535114 FROM t2 LIMIT 70%); ---- write-write conflict endloop ...
https://man.mtool.work/duckdb/2.0/dev/sqllogictest/multiple_connections.html
Appender 8012
The Appender can be used to load bulk data into a DuckDB database. It is available in the C, C++, Go, Java, Julia, Node.js, Python, and Rust clients. This page describes how the Appender behaves across clients and shows a minimal example in ... d rows by BEGIN TRANSACTION and COMMIT statements. Handling Constraint Violations If the Appender encounters a PRIMARY KEY conflict or a UNIQUE constraint violation, it fails and returns the following error: Constraint Error: PRIMARY KEY or UNIQUE constr ...
https://man.mtool.work/duckdb/2.0/data/appender.html
MERGE INTO Statement 8012
The MERGE INTO statement is an alternative to INSERT INTO ... ON CONFLICT that doesn't need a primary key since it allows for a custom match condition. This is a very useful alternative for upserting use cases ( INSERT + UPDATE ) when the d ...
https://man.mtool.work/duckdb/2.0/sql/statements/merge_into.html
Quack Remote Protocol 7906
The Quack extension turns a DuckDB instance into a server that other DuckDB instances (clients) can connect to over HTTP. This page covers the protocol at a glance and walks through basic usage on both sides of the wire. For the full list o ... ta = '{"role": "worker"}' ); meta is merged with auto-computed duckdb_version and platform keys; user-supplied keys win on conflict. whoami_started_at (an ISO 8601 timestamp) overrides the uptime anchor, otherwise uptime is measured from extension load. ...
https://man.mtool.work/duckdb/2.0/quack/overview.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work