Re: "slicing" records - Mailing list pgsql-general

From Claudio Lapidus
Subject Re: "slicing" records
Date
Msg-id BAY7-DAV54zHZlJ2HxY00000900@hotmail.com
Whole thread Raw
In response to "slicing" records  ("Claudio Lapidus" <clapidus@hotmail.com>)
List pgsql-general
Jan Wieck wrote:
> Oh, it's one of these _don't ask me why_ things ... well, then "what is
> the target legacy system?" ... hehe.
>
Of course, "don't ask me why" is my own way of saying "I don't know why!"
:-)

> If there is a total upper maximum for the object length and it's not way
> too obscenely large, then you can create a view that get's you this:
>
[snip]
> See attached sample script. I didn't know if you really wanted this
> fancy "whole|start|middle|end" string or if that was supposed to be the
> data of the fragment itself. Please notice that the view in the sample
> is "configured" for data sized up to 100 characters.

No, the destination system actually needs the labels as a flag of the
fragment position or if it's a fragment at all (i.e. not 'whole'). Actually,
your view/functions seem to almost fit my original need, I think they'll
just need minor touch up. Thanks a lot Jan, really nice code.

cheers
cl.

pgsql-general by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Damaged table
Next
From: Vivek Khera
Date:
Subject: Re: VACUUM degrades performance significantly. Database becomes