AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

JSON data in CS Postgres
 
 

Is it possible to handle JSON data returned by queries in the function passed to dbexec for postgres in sql? Normal calls to sql return data seperated by rows but a JSON request might return a blob of data containing key-value pairs so I am wondering if this is possible.

Also, going for an unstructured format, which is better HSTORE or JSON? I saw a video on the net show significant performance hit for json in postgres 9.2 but from what i’ve read this might have changed with 9.4

 

 
  [ # 1 ]

Maybe, probably not.  The system does not represent JSON data internally in such data structures. Reading JSON is just reading text, so if your function is designed to understand at least simple JSON formatting, you can retrieve data from it.

 

 
  [ # 2 ]

There are possibities: I think the new 9.4 postgres version has functions for converting a JSON output into a row format

 

 
  login or register to react