How to convert escaped text column - force E prefix

From: Durumdara <durumdara(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: How to convert escaped text column - force E prefix
Date: 2021-01-06 07:55:11
Message-ID: CAEcMXhkfup6xm9ipbFybwquhMkgLEt4G_3Ypv7_HiLnpz0mZUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Members!

A web developer stores JSON like strings in a text column.

With E prefix we can get the real text:

Select E'Az ad\u00f3kulcsonk\u00e9nti'

Hungarian: "Az adókulcsonkénti" (ISO-8859-2)

How to get the same result from a table column?

select WhatAFunction( ATable.JSONLikeTextColumn) from ATable

What function do we need to use to "simulate" E prefix?

Thank you for the help!

Best regards
dd

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Artur Zakirov 2021-01-06 08:02:16 Re: FTS and tri-grams
Previous Message Paul Förster 2021-01-06 07:35:52 LDAP(s) doc misleading