Re: Bytea datatype content to view - Mailing list pgsql-admin

From Wasim Devale
Subject Re: Bytea datatype content to view
Date
Msg-id CAB5fag53WHfrGk538+d2uMCdjjdaRskN_4anx4RMo-nFC0F4RQ@mail.gmail.com
Whole thread Raw
In response to Re: Bytea datatype content to view  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-admin

Thanks everyone for your valuable inputs.

On Wed, 6 Nov, 2024, 9:33 pm Alvaro Herrera, <alvherre@alvh.no-ip.org> wrote:
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/

pgsql-admin by date:

Previous
From: Edwin UY
Date:
Subject: Re: \i and \watch
Next
From: Wasim Devale
Date:
Subject: ON CONFLICT Clause used on partition tables