반응형

- 암호화 복호화

select

decrypt(decode(sec_test::varchar(50), 'hex')::bytea, '0123456789', 'cast5'),

encode(encrypt((juno_test)::bytea, '0123456789'::bytea, 'cast5'), 'hex')

from test



- 필드 검색

SELECT pg_class.relname, pg_attribute.attname, pg_type.typname, pg_attribute.atttypmod-4

FROM pg_class, pg_attribute, pg_type

WHERE pg_attribute.attrelid = pg_class.oid 

AND pg_attribute.atttypid = pg_type.oid 

--AND pg_class.relname = '테이블명'

and pg_attribute.attname like '%secno%'

order by relname

반응형

+ Recent posts