Guest User

Untitled

a guest
Jan 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. select * from json_populate_record(null::x, '{"a":1,"b":2}')
  2.  
  3. -- p_some_num of type int
  4. select * from json_populate_record( null:my_record_type, '{"a":'||p_some_num||'',"b":2}' )
  5.  
  6. ERROR: function json_populate_record(my_record_type, text) does not exist
  7.  
  8. select * from json_populate_record(
  9. null:my_record_type, ('{"a":'||p_some_num||'',"b":2}')::json )
  10.  
  11. CREATE TABLE x(a int,b int);
  12.  
  13. CREATE TYPE x(a int,b int);
Add Comment
Please, Sign In to add comment