修复LZ_UNCOMPRESS_EXTRACT可连续使用
This commit is contained in:
@ -875,19 +875,16 @@ BEGIN
|
||||
RAISE NOTICE 'v_raw=%', v_raw;
|
||||
END;
|
||||
/
|
||||
NOTICE: content=1F8B080000000000000363540600CC52A5FA02000000
|
||||
NOTICE: v_raw=0123
|
||||
ERROR: no compressed data found in handle 1
|
||||
CONTEXT: PL/pgSQL function gms_compress.lz_uncompress_extract(integer,raw) line 2 at assignment
|
||||
SQL statement "CALL gms_compress.lz_uncompress_extract(v_handle,v_raw)"
|
||||
PL/pgSQL function inline_code_block line 9 at SQL statement
|
||||
DECLARE
|
||||
content BLOB;
|
||||
BEGIN
|
||||
GMS_COMPRESS.LZ_UNCOMPRESS_CLOSE(1);
|
||||
END;
|
||||
/
|
||||
ERROR: handle 1 is not be used
|
||||
CONTEXT: SQL statement "CALL gms_compress.uncompress_close(handle)"
|
||||
PL/pgSQL function gms_compress.lz_uncompress_close(integer) line 2 at PERFORM
|
||||
SQL statement "CALL gms_compress.lz_uncompress_close(1)"
|
||||
PL/pgSQL function inline_code_block line 3 at PERFORM
|
||||
DECLARE
|
||||
content BLOB;
|
||||
v_handle int;
|
||||
|
||||
@ -261,6 +261,7 @@ Datum gms_lz_uncompress_extract(PG_FUNCTION_ARGS)
|
||||
Size dst_len = 0;
|
||||
bytea *dst = NULL;
|
||||
|
||||
compress_cxt->context[handle].compressed_data = NULL;
|
||||
gzip_uncompress(src, src_len, (void**)&dst, &dst_len);
|
||||
|
||||
SET_VARSIZE(dst, VARHDRSZ + dst_len);
|
||||
|
||||
Reference in New Issue
Block a user