sequencelastvalue(p_seqname text)

Slony-I 2.2.10 Documentation
Prev | Fast Backward | Chapter 8. Schema schemadoc | Fast Forward | Next

# 8.96. sequencelastvalue(p_seqname text)

Function Properties

Language: PLPGSQL

Return Type: bigint

sequenceLastValue(p_seqname) Utility function used in sl_seqlastvalue view to compactly get the last value from the requested sequence.

    declare
    	v_seq_row	record;
    begin
    	for v_seq_row in execute 'select last_value from ' || slon_quote_input(p_seqname)
    	loop
    		return v_seq_row.last_value;
    	end loop;

    	-- not reached
    end;

Prev | Home | Next
resubscribenode(p_receiver integer, p_provider integer, p_origin integer) | Up | sequencesetvalue(p_ignore_missing integer, p_last_value integer, p_ev_seqno bigint, p_seq_origin bigint, p_seq_id boolean)