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

From Alvaro Herrera
Subject Re: Bytea datatype content to view
Date
Msg-id 202411061603.rile4w5i3ugo@alvherre.pgsql
Whole thread Raw
In response to Bytea datatype content to view  (Wasim Devale <wasimd60@gmail.com>)
Responses Re: Bytea datatype content to view
List pgsql-admin
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: Steve Cooper
Date:
Subject: Re: Bytea datatype content to view
Next
From: Edwin UY
Date:
Subject: \i and \watch