In postgresql the || operator is the only way (no, the concat() function
doesn't work) to concat 2 JSONB dicts; note that this works only with JSONB
and not JSON.

Example:

suppose column "t.c" contains '{"a": 1}'::jsonb

SELECT t.c || jsonb_build_object('b', 2);

gives

 {"a": 1, "b": 2}

Question: How can I obtain the || operator in sqlalchemy (core, 1.3) to
merge 2 JSONB dicts?

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/CADKhPGRmKtTvZa4jpWby67v7fO-xbO31oJm%3D8jpb%2BrKS5_t2WQ%40mail.gmail.com.

Reply via email to