CedarDB Cloud is live! Get started for free →
releases December 3, 2026 • 8 minutes

CedarDB 2026: Release Rewind 

Part 3 covering materialized views, savepoints and PostgreSQL-compatible functions.

Following part 1 and part 2 of our Release Rewind, we continue our end-of-year recap of the most impactful features we have shipped across CedarDB’s 2026 releases. Whether you have kept up with every update or are just catching up, here is the next batch of additions we are most excited about.

Materialized Views

v2026-09-16

CedarDB answers analytical queries on live data fast enough that you usually don’t need to do any performance optimizations.

A Daily Revenue Rollup

Say you want daily revenue per region. You can just put the query into a plain view like this:

CREATE VIEW daily_revenue AS
SELECT ordered_at::date AS day,
       region,
       count(*)    AS orders,
       sum(amount) AS revenue
FROM orders
GROUP BY ordered_at::date, region;

SELECT * FROM daily_revenue WHERE day = current_date;

Each time you query the view, CedarDB aggregates the orders table again, so even the order that came in a second ago is counted in today’s bucket.

On 100 million orders and 16 cores, this takes 90 ms in CedarDB, and every order placed up to that moment is counted. Filtering is just as quick: revenue for a single day and region comes back in 10 ms, because CedarDB pushes the filter below the aggregation and skips the data it doesn’t need. PostgreSQL 18 needs 17 seconds for the same view on the same machine.

So in CedarDB you rarely need to precompute anything. The exception is when many people ask the same question at once. A dashboard open on a hundred screens runs the same aggregation a hundred times without the underlying data changing much.

Introducing Materialized Views

For that case, CedarDB now supports materialized views:

CREATE MATERIALIZED VIEW daily_revenue_mv AS
SELECT ordered_at::date AS day,
       region,
       count(*)    AS orders,
       sum(amount) AS revenue
FROM orders
GROUP BY ordered_at::date, region;

In the above sample, a query against daily_revenue_mv reads 7,300 pre-aggregated rows, instead of the 100 million orders. That takes CedarDB from about 11 dashboard queries per second to over 5,000.

You choose when it’s worth it to bring it up to date:

REFRESH MATERIALIZED VIEW daily_revenue_mv;

A refresh runs the view-defining query again, so it costs the same as running the query once (87 ms on CedarDB).

A refresh is an ordinary transaction. Thanks to snapshot isolation, readers keep seeing the previous contents until it commits, and nobody gets blocked. (PostgreSQL needs REFRESH ... CONCURRENTLY plus a unique index to give you that.) In CedarDB every refresh works this way, and we accept CONCURRENTLY so existing scripts keep running.

A materialized view is stored like a table, so you can index it like one. Indexes survive every refresh:

CREATE INDEX ON daily_revenue_mv (day, region);

Savepoints

v2026-09-29

A transaction is generally all or nothing. If one statement fails, the whole transaction is aborted. That is usually what you want, but sometimes you know in advance that a step is risky, and you would rather handle the failure than lose everything that came before. CedarDB now supports savepoints, which allow you to run potentially risky operations within a transaction without losing all previous changes.

A savepoint marks a point inside a transaction that you can later return to. ROLLBACK TO SAVEPOINT undoes everything after that mark and the transaction continues as if all changes after it, including failures, never happened. RELEASE SAVEPOINT removes the mark again without undoing anything.

Say you run a schema migration that adds a column and then tries to enforce unique email addresses, but you are not sure whether the existing data contains duplicates or not. With a savepoint, you can attempt the unique index and fall back to a regular index if it fails, without losing the rest of the migration, i.e., the added signup_source column:

BEGIN;
ALTER TABLE users ADD COLUMN signup_source TEXT DEFAULT 'web';

-- Try the risky step
SAVEPOINT before_unique;
CREATE UNIQUE INDEX users_email_key ON users (email);
-- ERROR: unique constraint violation

-- Undo the failed step, keep the new column
ROLLBACK TO SAVEPOINT before_unique;
CREATE INDEX users_email_idx ON users (email);
COMMIT;

The migration commits with the new column and a regular index on email, and you can clean up the duplicates before trying the unique index again.

The same pattern works for data changes that might violate a constraint. Say you process a batch of orders in one transaction, and each order reduces the stock of an item. A check constraint makes sure the stock never drops below zero, but you don’t know in advance whether every order can be fulfilled:

CREATE TABLE inventory (sku TEXT PRIMARY KEY, stock INT CHECK (stock >= 0));
CREATE TABLE orders (id INT PRIMARY KEY, sku TEXT, qty INT);
INSERT INTO inventory VALUES ('widget', 10), ('gadget', 2);

BEGIN;
INSERT INTO orders VALUES (1, 'widget', 3);
UPDATE inventory SET stock = stock - 3 WHERE sku = 'widget';

-- Try the next order
SAVEPOINT order_2;
INSERT INTO orders VALUES (2, 'gadget', 5);
UPDATE inventory SET stock = stock - 5 WHERE sku = 'gadget';
-- ERROR: violation of check constraint inventory_stock_check

-- Undo order 2, but keep order 1
ROLLBACK TO SAVEPOINT order_2;

INSERT INTO orders VALUES (3, 'widget', 1);
UPDATE inventory SET stock = stock - 1 WHERE sku = 'widget';
COMMIT;

Only the order that could not be fulfilled is dropped. Orders 1 and 3 are committed, and the stock is updated accordingly:

SELECT * FROM orders;
 id |  sku   | qty
----+--------+-----
  1 | widget |   3
  3 | widget |   1

Without the savepoint, the error would have aborted the whole transaction, and you would have to start over from the beginning.

PostgreSQL-Compatible Functions

v2026-08-20, v2026-09-29, v2026-10-08

Most apps don’t send only plain SELECTs. They define SQL functions, draw sequence numbers with nextval(), sample rows with random(), and change data with WITH ... DELETE ... RETURNING. These queries only work if the database follows the same rules as PostgreSQL. We went through these rules one by one, so CedarDB now behaves the way you’d expect from PostgreSQL.

  1. SQL functions are written the PostgreSQL way. Function bodies can be plain SELECT statements, as you’d write them for PostgreSQL:

    CREATE FUNCTION order_total(qty int, price numeric) RETURNS numeric
    LANGUAGE sql AS 'SELECT qty * price';
  2. Volatile functions run exactly once. random(), nextval() and now() look alike, but they aren’t. now() returns the same value for the whole transaction, while random() and nextval() return something new every time they run. That makes “how often does it run?” part of the result. CedarDB used to compute such expressions again whenever the optimizer found that cheaper. It now evaluates each volatile expression exactly once per row, and a CTE that contains one is computed exactly once:

    WITH r AS (SELECT random() AS v)
    SELECT a.v = b.v AS same_value FROM r a, r b;
    -- same_value: t

    A CTE is one result, even if you read it twice. The same applies to nextval(): each row gets exactly one ticket number, without gaps from evaluating it twice.

  3. Function bodies are checked at CREATE. A typo in a function body now shows up when you create the function, not the first time a user calls it:

    CREATE FUNCTION price_with_tax(net numeric) RETURNS numeric
    LANGUAGE sql AS 'SELECT net * (1 + tax_rate())';
    -- ERROR:  unknown function or overload tax_rate()

    Sometimes you want to create functions in an order where one uses another that doesn’t exist yet, for example when restoring a dump. For that, turn the check off, as in PostgreSQL:

    SET check_function_bodies = off;
    CREATE FUNCTION price_with_tax(net numeric) RETURNS numeric
    LANGUAGE sql AS 'SELECT net * (1 + tax_rate())';   -- checked when called
  4. Data-modifying CTEs run once and to completion. A DELETE, UPDATE or INSERT in a WITH clause is a statement, not a view. It must run exactly once and on all rows, no matter how much of its result the main query reads:

    WITH moved AS (
      DELETE FROM orders WHERE status = 'shipped' RETURNING *
    )
    SELECT count(*) AS moved FROM moved;

    Even WITH gone AS (DELETE FROM orders RETURNING id) SELECT id FROM gone LIMIT 1 deletes all orders, not just one. The same holds when the main query doesn’t read the CTE at all.

  5. Built-in functions accept named arguments. Some built-in functions take many optional arguments. Instead of passing them by position, name the ones you need:

    SELECT now() + make_interval(mins => 15);

Native IP Address Type

v2026-09-29, v2026-10-08

Like PostgreSQL, CedarDB supports the inet type to natively store IP addresses:

CREATE TABLE access_log (ip inet, time timestamp);

Compared to storing IP addresses as text, inet values are stored more compactly and allow faster operations on the same data. Storing IPv6 addresses as inet is over 2x more compact, and up to 3x faster. The following query takes ~500 ms on text IPs, but only ~150 ms for inet:

SELECT ip, count(*) FROM access_log
GROUP BY ip ORDER BY count DESC LIMIT 10;

Interactive Mode

v2026-09-29

CedarDB has two modes: the classic PostgreSQL server mode, and an interactive single-user CLI interface for offline analysis. To use it, start CedarDB with cedardb --interactive myDb:

> select id, count(*) from hits group by id order by count(*) desc limit 10;
 id | count  
----+--------
  2 | 404602 
 27 | 113167 
 13 |  45631 
 45 |  38960 
 44 |   9730 
  3 |   6896 
 62 |   5266 
 52 |   3554 
 50 |    938 
 28 |    836 
(10 rows)

This interactive shell is directly attached to your database, and you can enter SQL that is executed and the results displayed immediately.


That’s it for now!

See you soon in the next edition of the release rewind. It’s going to highlight JSON functions, binary protocol improvements, new foreign key actions, and more flexible privilege management.

Want to try out the new features right away? Head to CedarDB Cloud and run the queries on the shared demo project or your own trial instance, free of charge for 30 days.

Prefer working locally? Have a look at our installation guide.

Questions or feedback? Join us on Slack or reach out directly.