Re: Problem with partitioning - Mailing list pgsql-general

From JotaComm
Subject Re: Problem with partitioning
Date
Msg-id CAA8OQ6-a_3nRtSbRRWCG79JSqYCDm_M9jpdT0sgxphLkzJqkrA@mail.gmail.com
Whole thread Raw
In response to Re: Problem with partitioning  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Problem with partitioning  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Problem with partitioning  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hello,

2016-08-03 15:29 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com>:
On 08/03/2016 11:24 AM, JotaComm wrote:


2016-08-03 15:20 GMT-03:00 JotaComm <jota.comm@gmail.com
<mailto:jota.comm@gmail.com>>:



    ​When I create a trigger for each child table the trigger works very
    well.​

​​
Without seeing any code this problem is not going to be solved.

​The trigger code:

tg_table_update AFTER UPDATE ON parent_table FOR EACH ROW EXECUTE PROCEDURE f_table_update()

CREATE OR REPLACE FUNCTION f_table_update()

RETURNS TRIGGER AS $$

BEGIN

RAISE NOTICE 'update';

UPDATE parent_table SET date=now() WHERE column_id=OLD.column_id;

RETURN NULL;

END;

$$ LANGUAGE PLPGSQL;
 



            ​Try:

            \d+ <tablename> on the relevant table and check/show the
            "Triggers: " section​.

            David J.


    --
    JotaComm
    http://jotacomm.wordpress.com




--
JotaComm
http://jotacomm.wordpress.com


--
Adrian Klaver
adrian.klaver@aklaver.com

​Thank you​


--

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problem with partitioning
Next
From: Tom Lane
Date:
Subject: Re: Problem with partitioning