All pastes #548302 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-07 18:08 UTC
rendered paste body
create or replace function reset_sequences() returns integer as
'
    DECLARE
        a integer;
    BEGIN
        Select into a (max(object_code)+1) from sys_objects;
        alter sequence sys_objects_object_code_seq restart with a;
        return a;
    END;
' language 'plpgsql';