Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Postgres JSONB Update from Grid

rolandkreuzer's profile image rolandkreuzer posted 2 months ago in General Permalink

In HeidiSQL 11 the Postgres type JSONB seems to be included in the type definition. It is now shown in the table layout (where HeidiSQL 10 had shown an "unknown" data type shown as varchar in grid).

The default grid view for the typ is Hex/Binary but allows to switch via grid view options to a textual representation of the JSON contents.

However, independently of the setting updates on the field seem to use the binary value under the hood - which is not supported by Postgres (I'm using v10.3)

UPDATE "schema"."tablename" SET "data"=0x7B22736B75223A2022415634362D303839...

ERROR: syntax error at or near "0x7B22736B75223A2022415634362D303839...

Editing the value previously worked in older HeidiSQL versions as the unknown type was updated as a varchar.

Would it be possible to update JSONB fields via the textual representation again?

rolandkreuzer's profile image rolandkreuzer posted 1 month ago Permalink

Nevermind, seems already fixed in newer builds.

I just updated Build 11.2.0.6250; JSONB is now treated as text.

Thanks a lot!

ansgar's profile image ansgar posted 1 month ago Permalink

Yes, this was issue #1321

Thought the issue was reported by you, as it was created on the same day as this thread, just a few hours later.

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.