LIKE search in bytea datatype (PostgreSQL)

by guettli   Last Updated October 15, 2018 14:06 PM

Table:

\d blob

 Column  |       Type   | Collation |                 Default                  
---------+--------------+-----------+------------------------------------------
 id      | integer      |           | nextval('modlink_blob_id_seq'::regclass)
 content | bytea        |           | 

This statement:

SELECT COUNT(*) "job" INNER JOIN "blob" ON ("job"."input_id" = "blob"."id")
  WHERE UPPER("blob"."content"::text) LIKE UPPER('%csv%');

Error message:

ERROR:  invalid memory alloc request size 1989028364

What can I do to make this statement not fail?

Tags : postgresql bytea


Related Questions


Postgresql and UTF8 to Latin1 conversion?

Updated May 25, 2017 05:06 AM



Dump all binary columns from a table as files

Updated May 25, 2017 04:06 AM

Limiting PostgreSQL logging

Updated May 25, 2017 05:06 AM