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
1) Postgres 16.1 throws an error:
```
NOTICE: schema "grestv0" already exists, skipping
NOTICE: web_anon exists, skipping...
NOTICE: authenticator exists, skipping...
NOTICE: role "authenticator" has already been granted membership in role "web_anon" by role "postgres"
NOTICE: table "genesis" does not exist, skipping
NOTICE: No fuctions found in schema grest
ERROR: syntax error at or near "FOR"
LINE 1: FOR r IN (SELECT trigger_name, event_object_table FROM infor...
^
Exiting...
```
Copy file name to clipboardExpand all lines: files/grest/rpc/db-scripts/basics.sql
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -116,9 +116,17 @@ END
116
116
$do$;
117
117
118
118
-- DROP EXISTING GREST ADDED TRIGGERS ON PUBLIC SCHEMA
119
-
FOR r IN (SELECT trigger_name, event_object_table FROMinformation_schema.triggersWHERE trigger_schema ='public'AND action_statement LIKE'%grest.%') LOOP
120
-
EXECUTE 'DROP TRIGGER IF EXISTS '|| quote_ident(r.trigger_name) ||' ON '|| quote_ident(r.event_object_table);
121
-
END LOOP;
119
+
DO
120
+
$$
121
+
DECLARE
122
+
r record;
123
+
BEGIN
124
+
FOR r IN (SELECT trigger_name, event_object_table FROMinformation_schema.triggersWHERE trigger_schema ='public'AND action_statement LIKE'%grest.%')
125
+
LOOP
126
+
EXECUTE 'DROP TRIGGER IF EXISTS '|| quote_ident(r.trigger_name) ||' ON '|| quote_ident(r.event_object_table);
0 commit comments