Relative Content

Tag Archive for postgresqlsqlalchemy

Upsert element in column that contains arrays

I have a PostgreSQL table that contains a column with array of strings, and I use SQLAlchemy to manage it.
I would like to build an “upsert” function, so if a specific cell contains as example {'a', 'b'}, and I try to update it with 'b', the output should be still {'a', 'b'}.