AWS Redshift에서 url 디코딩 된 값을 보고 싶을 때
기본적으로 제공되는 건 없고 아래와 같이 함수를 생성해야 한다.
create function url_decode(text character varying) returns character varying
immutable
language plpythonu
as $$
result = None
if text is not None:
import urllib
result = urllib.unquote_plus(text)
return result
$$;
아래와 같이 url_decode 함수를 사용하면 된다.
select url_decode(query) as url_decode, * from table;
AWS Redshift에서 사용자가 생성한 프로시저를 보고 싶을 때
아래와 같이 쿼리를 사용하여 확인할 수 있다.
SELECT
n.nspname,
b.usename,
p.proname,
p.prosrc
FROM
pg_catalog.pg_namespace n
JOIN pg_catalog.pg_proc p ON
pronamespace = n.oid
join pg_user b on
b.usesysid = p.proowner
where
nspname not in ('information_schema',
'pg_catalog')

댓글 영역