On Mon, Aug  3, 2020 at 04:44:38PM -0400, Joe Conway wrote:
> It is easier to reproduce than that:
> 
> select repeat('x',600000000)::bytea;
> ERROR:  invalid memory alloc request size 1200000003
> 
> select octet_length(repeat('x',600000000)::bytea);
>  octet_length
> --------------
>     600000000
> (1 row)
> 
> CREATE TABLE big_data AS
>  select repeat('x',600000000)::bytea;
> SELECT 1

Oh, nice!  I played with repeat(), but couldn't get it to load, then
fail.  I didn't do the cast to bytea, which is the trick.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee



Reply via email to