How to get an md5/sha256 hash of a really large object in psql?

From: Alex Shan <3341018(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: How to get an md5/sha256 hash of a really large object in psql?
Date: 2023-07-29 06:42:35
Message-ID: CAAFmqa_MfByym+AyQAjq23_gd-p-=2c57KqXCr6D5BK_o46_Dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

In my DB I have a large object over 4GB in size.
I need to get its MD5 or SHA256 from within psql query, i.e. without
exporting it to FS first.

“SELECT md5(lo_get(loid));” doesnt work — “large object is too large”.

Is there any other way to do it?

Regards,
Al

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2023-07-29 08:59:07 Re: How to improve the performance of my SQL query?
Previous Message Michael Paquier 2023-07-29 02:55:41 Re: backup_manifest rename to backup_manifest.old after successful postgres start up