Skip to content

Instantly share code, notes, and snippets.

@mpage
Created January 21, 2015 20:46
Show Gist options
  • Select an option

  • Save mpage/6cd38c61b99e562a62e4 to your computer and use it in GitHub Desktop.

Select an option

Save mpage/6cd38c61b99e562a62e4 to your computer and use it in GitHub Desktop.
SELECT nextval(pg_get_serial_sequence('<table>', '<column>'))
FROM generate_series(0, <num_children>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment