Jennifer Lee wrote:
> something like
>
> Parent1*Parent2
> or
> (grandparent1*grandparent2)*(grandparent3*grandparent4)
> or something even more complex
>
> The field is called ancest in table passport_temp.
>
> I need to separate each of the parents and/or grandparents etc to load
> them individually in a pedigree table. I'm trying to do this in plpgsql,
> but haven't been able to figure out if there is a way to parse the
> field.
You haven't been very specific, so it's hard to offer concrete advice.
But in any case, take a look at split_part() and replace() functions
(and possibly others) here:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=functions-string.html
HTH,
Joe