« first day (12 days earlier)    last day (14 days later) » 

8:38 PM
I running this query
UPDATE site_content
SET content = jsonb_set(content, '{playersContainer,players}', (content->'playersContainer'->'players') #- '{"id":"2"}' );
however I get the error
ERROR: syntax error at or near "{"
LINE 2: ...rs}', (content->'playersContainer'->'players') #- {"id":"2"}...
^

********** Error **********

ERROR: syntax error at or near "{"
SQL state: 42601
Character: 129
I have changed my query to this
UPDATE test
SET content = jsonb_set(content, '{playersContainer,players}', (content->'playersContainer'->'players'->'id') #- '{2}' )
Seems to work in pgadmin, but in my code i get this
ARNING: Failed to execute:
UPDATE test
SET content = jsonb_set(content, '{playersContainer,players}', (content->'playersContainer'->'players'->'id') #- '{2}' )
because: ERROR: operator does not exist: json #- unknown
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 

« first day (12 days earlier)    last day (14 days later) »