Re: plpgsql question

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: plpgsql question
Дата
Msg-id 3FA73BDD.1090009@joeconway.com
обсуждение исходный текст
Ответ на plpgsql question  ("Jennifer Lee" <jlee@scri.sari.ac.uk>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: transposed query?
Следующее
От: Joe Conway
Дата:
Сообщение: Re: How to use dblink within pl/pgsql function: