materialize icon indicating copy to clipboard operation
materialize copied to clipboard

adapter: add hint to "unknown cluster" error

Open chaas opened this issue 1 year ago • 0 comments

If you set your cluster session configuration parameter value to an invalid cluster name then try to execute a query, the error is unhelpful

materialize=> SELECT * FROM winning_bids;
ERROR:  unknown cluster 'foo'

We provide a much better hint for the SET command notice, and should provide that hint for this error too.

SET command notice hint:

materialize=> SET CLUSTER TO foo;
NOTICE:  cluster "foo" does not exist
HINT:  Create the cluster with CREATE CLUSTER or pick an extant cluster with SET CLUSTER = name. List available clusters with SHOW CLUSTERS.

chaas avatar May 10 '24 18:05 chaas