Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Created March 5, 2014 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhelmer/9377856 to your computer and use it in GitHub Desktop.
Save rhelmer/9377856 to your computer and use it in GitHub Desktop.
WITH rewrite_plan AS (
SELECT json_object_field_text(ucm.rewrite, 'rewrite_build_type_to') as release_channel,
json_array_elements(ucm.rewrite->'BuildID') AS buildid,
product_versions.product_version_id
FROM product_productid_map ppm
JOIN update_channel_map ucm USING (productid)
JOIN product_versions ON ppm.product_name = product_versions.product_name
WHERE product_versions.version_string = trim(both '"' FROM (ucm.rewrite->'Version')::text)
AND product_versions.product_name = 'B2G'
)
SELECT * FROM rewrite_plan;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment