Can I select keys stored in a postgres jsonb column as values dynamically
Like @a_horse told you, SQL is strictly typed and demands to know the resulting row type at call time at the latest.
If key names follow a predictable pattern, and there can only be a trivial number, you might &quot;overprovision&quot; in your views:
SELECT dynamic_data-&gt;'dynamicField1' AS dynamicField1
     , dynamic_data-&gt;'dynamicField2' AS dynamicField2
     , dynamic_data-&gt;'dynamicField3' AS dynamicField3  -- overprovisioned columns
     , ...
     , dynamic_data-&gt;'dynamicField3' AS dynamicField9
FROM  (SELECT json '{&quot;dynamicField1&quot;: &quot;value1&quot;
                   , &quot;dynamicField2&quot;: &quot;value2&quot;}') tbl(dynamic_data);

Missing keys get a NULL value. dynamicField3 - dynamicField9 are NULL in the example. The workaround has obvious weaknesses.