Re: Divide table raw into chunks - Mailing list pgsql-novice

From David G. Johnston
Subject Re: Divide table raw into chunks
Date
Msg-id CAKFQuwa4WREhMBQW0=vmUyQAEVj7evRHO4et2qo0gxEGc=57pg@mail.gmail.com
Whole thread Raw
In response to Re: Divide table raw into chunks  ("Miguel Beltran R." <yourpadre@gmail.com>)
List pgsql-novice
I have 4623 Sent ids (sentences) and each is 10,000 characters long. I want to divide them into 32-40 character long chunks. 

​I suppose replace {1,5} with {32,40} should work...the question is what is so special about 32-40 and why a range instead of just saying 40?  Does it really matter if the final group is less than 32 (assuming every other group was 40)?​

SELECT regexp_matches[1] FROM regexp_matches('0123456789012','(.{1,5})','g')

​Alter to taste.

David J.​

pgsql-novice by date:

Previous
From: "Miguel Beltran R."
Date:
Subject: Re: Divide table raw into chunks
Next
From: Jozef Riha
Date:
Subject: help needed with error during upgrade (9.4 -> 9.5)