public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Wasim Devale <[email protected]>
Cc: pgsql-admin <[email protected]>
Cc: Pgsql-admin <[email protected]>
Subject: Re: Bytea datatype content to view
Date: Wed, 6 Nov 2024 17:03:00 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAB5fag593g9wK+hDdWDqRDUnd-N1XLAFNaGKv37F95LngkvdgQ@mail.gmail.com>

On 2024-Nov-06, Wasim Devale wrote:

> Hi All
> 
> I have a table having bytea datatype. Anyone has worked on it how we can
> see the content as the files are in .csv, .pdf, .bin and .docx format.

In a pinch, you could turn the bytea column into an LO using the
lo_from_bytea() function and use psql's \lo_export.  Quick and easy, no
need to write any code.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/





view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Bytea datatype content to view
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox