查看文件是否在指定目录
SELECT pg_read_binary_file('/var/lib/postgresql/test.mp4');
将文件插入字段为bytea类型的表
INSERT INTO users ( user_name, user_video )
VALUES
( 'liuyunshengsir', pg_read_binary_file ( '/var/lib/postgresql/test.mp4' ) )
SELECT pg_read_binary_file('/var/lib/postgresql/test.mp4');
INSERT INTO users ( user_name, user_video )
VALUES
( 'liuyunshengsir', pg_read_binary_file ( '/var/lib/postgresql/test.mp4' ) )