Re: String functions like split() and join() in plpgsql - Mailing list pgsql-general

From Tom Lane
Subject Re: String functions like split() and join() in plpgsql
Date
Msg-id 12227.1042511992@sss.pgh.pa.us
Whole thread Raw
In response to String functions like split() and join() in plpgsql  ("David U." <davidu@everydns.net>)
Responses Re: String functions like split() and join() in plpgsql
List pgsql-general
"David U." <davidu@everydns.net> writes:
> I'm writing a trigger to change the third field in a varchar record. (it's
> an SOA field from DNS) and I can do it in plperl but since it needs to be a
> trigger I have to do it in plpgsql (or other right?).

There's nothing to stop you from calling a plperl function from a
plpgsql trigger function.  If you've got complicated string-mashing
requirements, I'd certainly recommend coding them in plperl (or pltcl).

Someday someone should get around to implementing trigger support for
plperl, but in the meantime a two-layer approach seems like your answer.

            regards, tom lane

pgsql-general by date:

Previous
From: "David U."
Date:
Subject: String functions like split() and join() in plpgsql
Next
From: Tom Lane
Date:
Subject: Re: Server error and deadlocks