Skip to content

Instantly share code, notes, and snippets.

@benhannel
Created July 31, 2019 23:30
Show Gist options
  • Save benhannel/abb79e57fbeceeb1a2eb55423f35372f to your computer and use it in GitHub Desktop.
Save benhannel/abb79e57fbeceeb1a2eb55423f35372f to your computer and use it in GitHub Desktop.
Populating a table from a JSON string
INSERT INTO company_regions
SELECT *
FROM json_populate_record(NULL::company_regions,
'{"region_id":"10","company_regions":"British Columbia","country":"Canada"}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment