Changelog

Configurable defaults for configuration parameters

02.08.2024

There are details in your Materialize development workflow that you shouldn't have to remember: the namespace or cluster you connect to by default is one of them.

To save you the hassle, it's now possible to configure defaults for configuration parameters for a role using the new ALTER ROLE...SET command. This also allows you to ensure that external tools that connect to Materialize using non-native connectors use the right connection parameters!

1
-- Say an admin configured the default cluster for **all** users to be
2
-- queries_brr.
3
SHOW cluster;
4

5
 cluster
6
------------
7
 queries_brr
8

9
-- As a forgetful dev, you can set your day-to-day development cluster to a
10
-- different default.
11
ALTER ROLE forgetful_dev SET cluster TO queries_dev;
12

13
-- Whenever you start a new SQL session (and only then!), you'll see that the
14
-- change was picked up.
15
SHOW cluster;
16

17
 cluster
18
------------
19
 queries_dev
sql

If you're a superuser, you can modify these defaults globally using the ALTER SYSTEM...SET command.

1
-- Important things changed, and you don't want users connecting to queries_brr
2
-- by default anymore? Change it for everyone at once!
3
ALTER SYSTEM SET cluster TO queries_skrrtt;
sql