Re: Bytea datatype content to view

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Wasim Devale <wasimd60(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Bytea datatype content to view
Date: 2024-11-06 16:03:00
Message-ID: 202411061603.rile4w5i3ugo@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Edwin UY 2024-11-07 05:09:55 \i and \watch
Previous Message Holger Jakobs 2024-11-06 14:09:58 Re: Bytea datatype content to view