Skip to content

Instantly share code, notes, and snippets.

@sebastianwebber
Created February 1, 2016 18:24
Show Gist options
  • Select an option

  • Save sebastianwebber/37532c12542c208fd862 to your computer and use it in GitHub Desktop.

Select an option

Save sebastianwebber/37532c12542c208fd862 to your computer and use it in GitHub Desktop.
SELECT to generate new table owner in PostgreSQL
SELECT
'ALTER TABLE ' ||
schemaname || '.' || relname ||
' OWNER TO novo_user;'
FROM pg_stat_user_tables;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment