please some help on trigger creation

From: Feite Brekeveld <feite(dot)brekeveld(at)osiris-it(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: please some help on trigger creation
Date: 2001-03-12 22:45:13
Message-ID: 3AAD5179.3BBE14BF@osiris-it.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Suppose:

create table rawrecords (
myrec text;
);

create table cookedrecords (
id varchar(10) not null,
name varchar(20) not null,
value integer not null
);

We insert a record say string: "thisid/thisname/12345" into the
rawrecords table.

I would like to have a trigger on that table that splits the raw record
into:

thisid thisname 12345

and inserts those in the cookedrecords table.

It's easy to split such a string using a perl function but how to get
them in the table then ?

Seperate functions to get each attribute ? seems quite expensive !

Am I overlooking some posibilities here ?

Thanks,

Feite Brekeveld

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-12 23:10:08 Re: Poor Delete performance
Previous Message Limin Liu 2001-03-12 22:44:41 Re: display temp table structure?