本页介绍天翼云TeleDB数据库存储过程开发的GOTO语句。 teledb create or replace procedure pgoto(vmaxnum integer) as $$ declare maxnum integer; begin maxnum : vmaxnum; for i in 1..maxnum loop if i3 then goto label; end if; raise notice 'i%',i; end loop; > raise notice 'goto end'; end; $$ language plpgsql; CREATE PROCEDURE teledb call pgoto(5); NOTICE: i1 NOTICE: i2 NOTICE: goto end CALL teledb go 用于跳转到某个标签下。
SHELL实例 shell !/bin/sh ak"ak 请从云点播控制台【密钥管理】【原生密钥】获取" sk"sk 请从云点播控制台【密钥管理】【原生密钥】获取" endpoint" uri"/xstorevod/video/files" httpMethod"POST" DateValue"TZGMT date +'%a, %d %b %Y %H:%M:%S GMT'" stringToSign"${httpMethod}nnn${DateValue}n${uri}" signatureecho en ${stringToSign} openssl sha1 hmac ${sk} binary base64 body入参为json格式 apiParam'{"videoId":"请从云点播控制台【点播模式】【媒体库】获取"}' echo "curl H "ContentType: application/json" H "Date: ${DateValue}" H "signature: AWS ${ak}:${signature}" d '${apiParam}' X POST "${endpoint}${uri}"" sh c "curl H 'ContentType:application/json' H 'Date: ${DateValue}' H 'signature: AWS ${ak}:${signature}' d '${apiParam}' X POST '${endpoint}${uri}'" 如果调用脚本失效,可将shell从sh更换成bash再试一次。