Hi,
out of curiosity, I freed a clob via dbms_lob.freetemporary but how can I check if it is freed? I want to recreate a temporary clob but "is null" condition is not working. any operation like getlength in dbms_lob cause invalid lob locator since it is freed. is there a way:
set serveroutput on;
declare
x_clob clob := 'A';
begin
dbms_lob.freetemporary(x_clob);
if x_clob is null then
dbms_output.put_line('it is null, create temporary');
--x_clob := empty_clob();
dbms_lob.createtemporary(x_clob, true);
else
dbms_output.put_line('not null');
--return;
end if;
x_clob := x_clob || 'a';
end;
/
when you run the code above it will show output "not null" and then error because of:
x_clob := x_clob || 'a';
because it tries to read x_clob variable at the right side of the assignment. how can I check if a clob (blob) object is freed. I know I can assign null or empty_clob instead of using dbms_lob.freetemporary but I am curious if there is a way. thanks.