please some help on trigger creation - Mailing list pgsql-general

From Feite Brekeveld
Subject please some help on trigger creation
Date
Msg-id 3AAD5179.3BBE14BF@osiris-it.nl
Whole thread Raw
Responses Re: please some help on trigger creation  (will trillich <will@serensoft.com>)
List 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


pgsql-general by date:

Previous
From: Christopher Sawtell
Date:
Subject: Backup and analyse
Next
From: newsreader@mediaone.net
Date:
Subject: -F option again