Re: Getting text into a table

Поиск
Список
Период
Сортировка
От novice
Тема Re: Getting text into a table
Дата
Msg-id ddcb1c340812101332k613d8feo35a3eda4ef6911ef@mail.gmail.com
обсуждение исходный текст
Ответ на Getting text into a table  (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>)
Список pgsql-general
2008/12/11 Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>:
> I wonder if I could ask a question which might be marginally off-topic: how
> do people assemble multiple lines of text into a row in a table?
>
> I've got a number of cases where I've got a file containing some sort of
> activity log, where a sequence of activities extends over multiple lines.
>
> In some cases multiple activities might be interleaved, rather than each
> activity comprising a sequence of contiguous lines.
>
> Complicating things, related lines might be only recognisable by content.
>
> As an example, a Sendmail maillog file where a delayed outgoing message will
> result in a number of lines of text. I'd like each row in the table to
> contain the sender, recipient, eventual state, and the time it took to
> arrive at that state.
>
> I'm sure I'm not the only person doing this sort of thing, but there has to
> be a better answer than coding Perl for each job. Does anybody have any
> suggestions for tools well-matched to this sort of problem, i.e. that can
> match patterns, store matched patterns or update counters, backtrack where
> necessary, and so on?
>

You're right, you're not the only one. I use awk and postgres's substr
function, but I'm only a newbie and I'm hoping to hear about the more
easy/advanced options available.

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

Предыдущее
От: Eric Schwarzenbach
Дата:
Сообщение: Re: Ubuntu for servers (was TurnKey PostgreSQL)
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Ubuntu for servers (was TurnKey PostgreSQL)