Skip to content

Commit

Permalink
add NULL check
Browse files Browse the repository at this point in the history
  • Loading branch information
FxKu committed Sep 21, 2024
1 parent 43502da commit 83af8c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion postgres-appliance/scripts/post_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ BEGIN
FROM pg_class
WHERE relname = 'postgres_log_${i}'
AND relnamespace = 'public'::pg_catalog.regnamespace;
EXECUTE format('DROP %s IF EXISTS public.postgres_log_${i} CASCADE', obj_type);
IF obj_type IS NOT NULL THEN
EXECUTE format('DROP %s IF EXISTS public.postgres_log_${i} CASCADE', obj_type);
END IF;
END;\$\$;"

if [ "$LOG_SHIP_HOURLY" != "true" ]; then
Expand Down

0 comments on commit 83af8c5

Please sign in to comment.