Results of 1 - 10 of about 133 for While (0.002 sec.)
- Securing Extensions 12784
- DuckDB has a powerful extension mechanism, which has the same privileges as the user running DuckDB's (parent) process. This introduces security considerations. Therefore, we recommend reviewing the configuration options listed on this page
...s can be loaded. Set allow_unsigned_extensions = true at startup (e.g., duckdb -unsigned in the CLI). It cannot be changed while the database is running. Security-related configuration settings lock themselves , i.e., it is only possible to restrict c...ions = false; SET allow_community_extensions = true; Invalid Input Error: Cannot change allow_community_extensions setting while database is running Custom Extension Repositories DuckDB 2.0 introduced trusted custom extension repositories , which can...sts existing repositories) or 'undecided' (the default: blocks adding new repositories, but keeps trusting existing ones). While the database is running, the setting can only move from 'undecided' to 'allowed' or 'forbidden' , or from 'allowed' to 'fo... - https://man.mtool.work/duckdb/2.0/operations_manual/securing_duckdb/securing_ext...
- Profile and Monitor 9969
- Overview The JDBC driver exposes several ways to observe a running or completed query: cancelling and timing out queries, polling query progress, retrieving profiling output, and emitting memory-usage events through Java Flight Recorder . T
...n number of seconds. For long-running queries, DuckDBPreparedStatement.getQueryProgress() returns a QueryProgress snapshot while the query executes. It is intended to be called from a separate thread and exposes getPercentage() , getRowsProcessed() ,...ment("SELECT count(*) FROM range(1_000_000_000)")) { // Run the query on a background thread so its progress can be polled while it executes. CompletableFuture<Void> query = CompletableFuture.runAsync(() -> { try { ps.executeQuery().close(); } catch (...SQLException e) { throw new RuntimeException(e); } }); while (!query.isDone()) { QueryProgress progress = ps.getQueryProgress(); System.out.printf("%.1f%% (%d / %d rows)%n", progress.... - https://man.mtool.work/duckdb/2.0/clients/java/profiling.html
- Securing DuckDB 9969
- DuckDB is a powerful analytical database engine. It can read and write files, access the network, load extensions, and use system resources. Like any powerful tool, these capabilities require appropriate configuration when working with sens
...ries programmatically. These APIs accept user input such as file paths, table names, column names, and filter expressions. While they don't execute raw SQL strings, they still trigger DuckDB operations that can read files, access the network, and use...An attacker-controlled path could read sensitive files (e.g., /etc/passwd ) or access remote URLs. Table and column names: While these are typically identifiers rather than executable code, unsanitized input could lead to unexpected behavior or inform...Locking Configurations Security-related configuration settings generally lock themselves for safety reasons. For example, while we can disable community extensions using the SET allow_community_extensions = false , we cannot re-enable them again afte... - https://man.mtool.work/duckdb/2.0/operations_manual/securing_duckdb/overview.htm...
- PostgreSQL Compatibility 9788
- DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page. Floating-Point Arithmetic DuckDB and PostgreSQL handle floating-point arithmetic differently for division by
...Infinity Infinity Infinity Division on Integers When computing division on integers, PostgreSQL performs integer division, while DuckDB performs float division: SELECT 1 / 2 AS x; PostgreSQL returns 0 , while DuckDB returns 0.5 . To perform integer di...converting strings to numeric and boolean values. Therefore, there are several instances, where PostgreSQL throws an error while DuckDB successfully computes the result: Expression PostgreSQL DuckDB '1.1' = 1 error true '1.1' = 1.1 true true 1 = 1.1 f...ers cannot be turned off. Using Double Equality Sign for Comparison DuckDB supports both = and == for equality comparison, while PostgreSQL only supports = . SELECT 1 == 1 AS t; DuckDB returns true , while PostgreSQL returns: postgres=# SELECT 1 == 1... - https://man.mtool.work/duckdb/2.0/sql/dialect/postgresql_compatibility.html
- Handle Results 9594
- Overview Beyond the standard JDBC ResultSet , the DuckDB driver can hand results to Apache Arrow , stream large results instead of materializing them, and expose raw columnar data chunks. This page covers each of these result-handling optio
...y(); var allocator = new RootAllocator()) { try (var reader = (ArrowReader) resultset.arrowExportStream(allocator, 256)) { while (reader.loadNextBatch()) { System.out.println(reader.getVectorSchemaRoot().getVector("generate_series")); } } } Arrow Impo...query try (var stmt = conn.createStatement(); var rs = (DuckDBResultSet) stmt.executeQuery("SELECT count(*) FROM asdf")) { while (rs.next()) { System.out.println(rs.getInt(1)); } } } } Streaming Results Result streaming is opt-in in the JDBC driver. E...based ps.setInt(1, 42); try (DuckDBChunkedResult res = ps.query()) { // advance to the next chunk, returns true on success while (res.nextChunk()) { // get the current chunk from the result DuckDBDataChunkReader chunk = res.chunk(); // iterate over th... - https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
- Working with Huge Databases 9038
- This page contains information for working with huge DuckDB database files. While most DuckDB databases are well below 1 TB, in our 2024 user survey , 1% of respondents used DuckDB files of 2 TB or more (corresponding to roughly 10 TB of CS
...e database file, it sidesteps the object-storage file-size limits and the slow whole-database checkpoints described above, while still providing transactional guarantees.... - https://man.mtool.work/duckdb/2.0/guides/performance/working_with_huge_databases...
- Release Cycle 8470
- This document outlines the DuckDB and core extension release cycle framework. It is intended for developers working on DuckDB extensions to better understand the underlying processes. Overview DuckDB follows Semantic Versioning ( v<MAJOR>.<
...intended to ensure the quality of the upcoming release. During this phase additional testing and benchmarking is performed while reducing the risk of introducing last-minute bugs by disallowing feature merges. PRs into DuckDB Bug-fixes for vx.y.<z+1>...sions of DuckDB. This means that their release cycle can/should also be completely separate from the DuckDB release cycle. While the release cycle for stable API extensions is still work in progress, the basic idea is that the release cycle of stable...that the release cycle of these extensions tends to form a sometimes intricate dance around the main DuckDB release cycle. While the goal is to move as many extensions over to stable APIs, we expect unstable API extensions to be around for quite some... - https://man.mtool.work/duckdb/2.0/dev/release_cycle.html
- Run Queries 7915
- Overview Java applications send queries and read result sets through the familiar Statement , PreparedStatement , and ResultSet interfaces. This page covers sending queries and reading DuckDB's nested and composite types. For opening the Co
...TO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2)"); try (ResultSet rs = stmt.executeQuery("SELECT * FROM items")) { while (rs.next()) { System.out.println(rs.getString(1)); System.out.println(rs.getInt(3)); } } stmt.close(); jeans 1 hammer 2 Du...resolved member value ENUM String try (ResultSet rs = stmt.executeQuery("SELECT [1, 2, 3] AS l, {'a': 1, 'b': 2} AS s")) { while (rs.next()) { DuckDBArray list = (DuckDBArray) rs.getObject(1); Object[] values = (Object[]) list.getArray(); DuckDBStruct...0] AS l")) { rs.next(); DuckDBArray list = (DuckDBArray) rs.getObject(1); try (ResultSet elements = list.getResultSet()) { while (elements.next()) { int index = elements.getInt("INDEX"); // 1-based position int value = elements.getInt("VALUE"); // the... - https://man.mtool.work/duckdb/2.0/clients/java/querying.html
- WITH Clause 7721
- The WITH clause allows you to specify common table expressions (CTEs). Regular (non-recursive) common-table-expressions are essentially views that are limited in scope to a particular query. CTEs can reference each other and can be nested.
...T * FROM counter; i 1 2 3 4 5 Here, recurring.counter gives access to all rows accumulated across all previous iterations, while counter in the FROM clause only contains the rows from the most recent iteration. This is useful when termination conditio...gives the two keywords distinct meanings and supports both: UNION ALL forwards every candidate row to the next iteration, while UNION only forwards new or changed keys. See UNION vs. UNION ALL in USING KEY CTEs . The deprecated_using_key_syntax setti...y smaller union table sizes. This helps query runtime, memory consumption, and makes it feasible to access the union table while the iteration is still ongoing. In a CTE WITH RECURSIVE T(...) USING KEY ... , table T denotes the rows added by the last... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/with.html
- Appender 7540
- 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
...order of key , and deletes the rows that match. A NULL key matches nothing. A plain insert writes the rows in append order while preserve_insertion_order is on, which is the default. An upsert does not keep append order. When a flush contains duplicat...the transaction. Roll back before retrying. Start a new transaction if the retry must be part of one. If you press Ctrl-C while a Python function called from SQL is running during a flush, DuckDB treats it as an error in that function and discards th...lback during a flush also raise an exception. Use a separate appender for each thread. You can append rows or call clear() while an execute() result is open, but must finish that result before calling flush() : call con.fetchall() , call con.fetchone(... - https://man.mtool.work/duckdb/2.0/clients/python/appender.html
DuckDB 2.0 Documentation / man.mtool.work