DBMS_OUTPUT.PUT_LINE in postgresql
Below is the example to print the variable value in postgres anonymous block.
DO
$$
DECLARE
t integer;
BEGIN
t := nextval(‘DocumentContextIDSEQ’);
RAISE NOTICE ‘Hello %’,t;
END;
$$;
NOTICE: Hello 13
DO
DO
$$
DECLARE
t integer;
BEGIN
select nextval(‘DocumentContextIDSEQ’) into t;
RAISE NOTICE ‘Hello %’,t;
END;
$$;
NOTICE: Hello 11
DO