- Documentation
- Installation
- Data Import
- Client APIs
- SQL
- Introduction
- Statements
- Overview
- Select
- Insert
- Delete
- Update
- Create Schema
- Create Table
- Create View
- Create Sequence
- Create Macro
- Drop
- Alter Table
- Copy
- Export
- Data Types
- Expressions
- Functions
- Overview
- Numeric Functions
- Text Functions
- Pattern Matching
- Date Functions
- Timestamp Functions
- Time Functions
- Interval Functions
- Date Formats
- Date Parts
- Blob Functions
- Nested Functions
- Indexes
- Aggregates
- Window Functions
- Samples
- Pragmas
- Full Text Search
- Development
- Sitemap
- Why DuckDB
- FAQ
- Code of Conduct
- Live Demo
Blob Type
Version 0.2.9
Name | Aliases | Description |
---|---|---|
blob | bytea | variable-length binary data |
The blob (Binary Large OBject) type represents an arbitrary binary object stored in the database system. The blob type can contain any type of binary data with no restrictions. What the actual bytes represent is opaque to the database system.
-- create a blob value with a single byte (170)
SELECT '\xAA'::BLOB;
-- create a blob value with two bytes (65, 66)
SELECT 'AB'::BLOB;
Blobs are typically used to store non-textual objects that the database does not provide explicit support for, such as images. While blobs can hold objects up to 4GB in size, typically it is not recommended to store very large objects within the database system. In many situations it is better to store the large file on the file system, and store the path to the file in the database system in a VARCHAR
field.
Operators
See Blob Functions.
Search Shortcut cmd + k | ctrl + k