Re: Logical decoding plugin

Lists: pgsql-cluster-hackers
From: remi colli <RCD18(at)hotmail(dot)fr>
To: "pgsql-cluster-hackers(at)postgresql(dot)org" <pgsql-cluster-hackers(at)postgresql(dot)org>
Subject: Logical decoding plugin
Date: 2016-07-28 08:40:43
Message-ID: AM4PR0201MB15532D22E9D41F4314AD7A95C6000@AM4PR0201MB1553.eurprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cluster-hackers

Hi! I'm an intern, and I work on logical decoding plugin on PG.

I'm in troubles when I have a DELETE action on a table who don't have a primary key, in my C plugin :

the new tuple is empty

the old tuple is empty too

and there are not primary key....

Is it possible to get information about the deleted row ?

Thanks for all


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: remi colli <RCD18(at)hotmail(dot)fr>
Cc: "pgsql-cluster-hackers(at)postgresql(dot)org" <pgsql-cluster-hackers(at)postgresql(dot)org>
Subject: Re: Logical decoding plugin
Date: 2016-07-28 08:58:31
Message-ID: CAB7nPqRCFm5SGhQG58tvFNgjfpnF6hvVumi+qyRci68zan1sPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cluster-hackers

On Thu, Jul 28, 2016 at 5:40 PM, remi colli <RCD18(at)hotmail(dot)fr> wrote:
> Hi! I'm an intern, and I work on logical decoding plugin on PG.
>
>
> I'm in troubles when I have a DELETE action on a table who don't have a
> primary key, in my C plugin :
>
> the new tuple is empty
>
> the old tuple is empty too
> and there are not primary key....
>
> Is it possible to get information about the deleted row ?

What is the value of REPLICA IDENTITY for this table? You can identify
an old tuple by using either USING INDEX or FULL in your plugin.
--
Michael