Greenplum deletes partitions between specified dates

#!/bin/bash
first=$1
second=$2
while [ "$first" != "$second" ]
do
(GP连接字符串) <<EOF
alter table tablename${
    
    first} DROP partition ${
    
    first};
\q
EOF
let first=`date -d "-1 days ago ${first}" +%Y%m%d`
done

Guess you like

Origin blog.csdn.net/hardyer/article/details/103121742