You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACE PROCEDURE transfer(INT, INT, DEC)
LANGUAGE plpgsql
AS $$
BEGIN
-- subtracting the amount from the sender's account
UPDATE accounts
SET balance = balance - $3
WHERE id = $1;
-- adding the amount to the receiver's account
UPDATE accounts
SET balance = balance + $3
WHERE id = $2;
COMMIT;
END;
$$;
results in:
ERROR: 'function' BETA feature is disabled. Use 'FLAGS_ysql_beta_feature_function' or 'FLAGS_ysql_beta_features'
LINE 1: CREATE OR REPLACE PROCEDURE transfer(INT, INT, DEC)
The error message should read:
ERROR: 'function' BETA feature is disabled. To use this feature, set 'ysql_beta_features' yb-tserver gflag to true.
The text was updated successfully, but these errors were encountered:
Summary:
Make the 'ysql_beta_features' gflag default to 'true'.
Also edit the error message for "beta features disabled" for clarity (as per #1639).
Test Plan:
existing jenkins tests
Manually check for existing clusters by running a 'create function' command (currently a
beta feature). For instance:
```
CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$
BEGIN
RETURN i + 1;
END;
$$ LANGUAGE plpgsql;
```
Examples:
1. To enable beta features (default or explicitly set to true on start or create):
```
./bin/yb-ctl create
./bin/yb-ctl create --tserver_flags="ysql_beta_features=true"
./bin/yb-ctl restart --tserver_flags="ysql_beta_features=true"
```
2. To disable beta features (explicitly set to false on start or create)
```
./bin/yb-ctl create --tserver_flags="ysql_beta_features=false"
./bin/yb-ctl restart --tserver_flags="ysql_beta_features=false"
```
Reviewers: mikhail, kannan, dmitry, neil
Reviewed By: neil
Subscribers: sid, yql
Differential Revision: https://phabricator.dev.yugabyte.com/D6819
results in:
The error message should read:
The text was updated successfully, but these errors were encountered: