Re: plpgsql replication stored procedure
- From: "William Leite Araújo" <william(dot)bh(at)gmail(dot)com>
- To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- Cc: aaron(dot)clauson(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
- Subject: Re: plpgsql replication stored procedure
- Date: Mon, 17 Apr 2006 17:35:28 -0300
- Message-id: <bc63ad820604171335m8325673maf2d64648361a465(at)mail(dot)gmail(dot)com>
On 4/17/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
aaron(dot)clauson(at)gmail(dot)com writes:
> I'm trying to write a stored procedure that can capture all the changes
> to a table and record the changes based on the table's primary key.
> I can almost get there but the sticking point is being able to access
> the primary key field of the NEW/OLD record in the trigger stored
> procedure without knowing it's name.
My database has a table that store all changes mades on all tables. The insert is made by onde single trigger, but I create a function that build functions to convert an generic record on a text value.
If this is usefull, mail-me ;-)
Dynamic record name cannot be made on a plpgsql function. This topic was discursed some months ago.
--
William Leite Araújo
Especialista em Geoprocessamento - UFMG
Bacharel em Ciêncida da Computação - UFMG
MSN:
ufmgwil(at)yahoo(dot)com(dot)brICQ: 222159351
GTalk:
william(dot)bh(at)gmail(dot)comYahoo:
ufmgwil(at)yahoo(dot)com(dot)br
Skype:
william.bh
Home |
Main Index |
Thread Index