All pastes #548303 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-07 18:09 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';

>[Error] Script lines: 1-10 -------------------------
 ERROR: syntax error at or near "$1"
 Line: 1