Skip to content

Instantly share code, notes, and snippets.

@b4tman
Created January 31, 2020 12:30
Show Gist options
  • Save b4tman/7c8b7f76089c34efbb52e9128347dd24 to your computer and use it in GitHub Desktop.
Save b4tman/7c8b7f76089c34efbb52e9128347dd24 to your computer and use it in GitHub Desktop.
CREATE LANGUAGE plpgsql;
create function m1_exec(text) returns void as $BODY$BEGIN execute $1; END;$BODY$ language plpgsql;
select m1_exec('ALTER TABLE ' || table_name || ' SET WITHOUT OIDS;') from information_schema.tables where table_schema = 'public';
drop function m1_exec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment