user7239: When running sql script to view data on Cexplorer database, many times,I see binary data.
for example, multi_asset.name, multi_asset.policy in the following query.

Is there any way to view these data in normal text?
Thanks very much.

user5926: These fields are not in general "normal text". They might be normal text (eg ASCII) or they could also be UTF-8 or UTF-16 or any other encoding.
The most sensible way to view them is as hexadecimal and that is what the psql command line does. Eg:
$ psql cexplorer
psql (14.5 (Debian 14.5-1), server 13.7 (Debian 13.7-0+deb11u1))
Type "help" for help.

cexplorer=# select * from multi_asset limit 1 ; 
 id |                           policy                           |       name       |                 fingerprint                  
----+------------------------------------------------------------+------------------+----------------------------------------------
  1 | \x00000002df633853f6a47465c9496721d2d5b1291b8398016c0e87ae | \x6e7574636f696e | asset12h3p5l3nd5y26lr22am7y7ga3vxghkhf57zkhd
(1 row)

So it you want something that is guaranteed to be "normal text" you should use the fingerprint field, which is Bech32 encoded.

user7523: in your case:
SELECT multi_asset.policy::text human_policy FROM ...

or
SELECT encode(multi_asset.name::bytea, 'escape'::text) human_name FROM ... 


7239: <p>When running sql script to view data on Cexplorer database, many times,I see binary data.
for example, multi_asset.name, multi_asset.policy in the following query.</p>
<p><a href="https://i.stack.imgur.com/68HfE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/68HfE.png" alt="enter image description here" /></a></p>
<p>Is there any way to view these data in normal text?</p>
<p>Thanks very much.</p>
 5926: <p>These fields are not in general &quot;normal text&quot;. They <em>might</em> be normal text (eg ASCII) or they could also be UTF-8 or UTF-16 or any other encoding.</p>
<p>The most sensible way to view them is as hexadecimal and that is what the <code>psql</code> command line does. Eg:</p>
<pre><code>$ psql cexplorer
psql (14.5 (Debian 14.5-1), server 13.7 (Debian 13.7-0+deb11u1))
Type &quot;help&quot; for help.

cexplorer=# select * from multi_asset limit 1 ; 
 id |                           policy                           |       name       |                 fingerprint                  
----+------------------------------------------------------------+------------------+----------------------------------------------
  1 | \x00000002df633853f6a47465c9496721d2d5b1291b8398016c0e87ae | \x6e7574636f696e | asset12h3p5l3nd5y26lr22am7y7ga3vxghkhf57zkhd
(1 row)
</code></pre>
<p>So it you want something that is guaranteed to be &quot;normal text&quot; you should use the <code>fingerprint</code> field, which is Bech32 encoded.</p>
 7523: <p>in your case:</p>
<pre><code>SELECT multi_asset.policy::text human_policy FROM ...
</code></pre>
<p>or</p>
<pre><code>SELECT encode(multi_asset.name::bytea, 'escape'::text) human_name FROM ... 
</code></pre>
