Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Estissevale 🍒 (alice@bidule.menf.in)'s status on Thursday, 10-May-2018 12:59:35 EDT Estissevale 🍒 Estissevale 🍒
    Oooh I love postgresql's jsonb type ! I accidently set the background image for my pleroma account and didn't find a way to delete it in the interface. So I searched a bit in the database and quickly found that the column users.info contained it (quite easy).

    At first, I didn't know about jsonb, so I thought it was a string and I was in for a painful REGEXP_REPLACE to remove the "background" property of the object. Then the psql interpreter complained about my trying to use REGEXP_REPLACE on a jsonb value, I read about it and realised my UPDATE would be as simple as :

    UPDATE users SET info = info - 'background' WHERE id = 1;

    (that's right, my id is 1, that's what you get for opening your own instance 😉)
    In conversation Thursday, 10-May-2018 12:59:35 EDT from bidule.menf.in permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.