From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Miguel Beltran R(dot)" <yourpadre(at)gmail(dot)com> |
Cc: | Shmagi Kavtaradze <kavtaradze(dot)s(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Divide table raw into chunks |
Date: | 2016-03-03 23:20:13 |
Message-ID: | CAKFQuwa4WREhMBQW0=vmUyQAEVj7evRHO4et2qo0gxEGc=57pg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Rowan | 2016-03-07 06:43:13 | Trigger function failure |
Previous Message | Miguel Beltran R. | 2016-03-03 22:49:47 | Re: Divide table raw into chunks |