Re: can't call function to delete the table - Mailing list pgsql-admin

From Luca Ferrari
Subject Re: can't call function to delete the table
Date
Msg-id CAKoxK+6-XO8pDGGWv7RpurTdU=EmB8rskeY2Od2BvKL2GRaPRQ@mail.gmail.com
Whole thread Raw
In response to can't call function to delete the table  (Pepe TD Vo <pepevo@yahoo.com>)
List pgsql-admin
On Mon, Oct 14, 2019 at 6:27 PM Pepe TD Vo <pepevo@yahoo.com> wrote:
> SELECT pr_mig_bnft_hist_actn_ldim();
>
> execute the store funtion no error but two tables are the same and didn't delete and/or insert any from one to
other;
>

As others have already pointed out, you seems to return a trigger
tuple from a normal function, so first step is to remove the "RETURN
NEW". Then I would add a couple of RAISE statements because it sounds
me strange that the function is invoked without producing any error
nor results.
Last, I would change the DELETE with a TRUNCATE, assuming you are not
inserting the very same quantity of rows on the next step.

Luca



pgsql-admin by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: Question about pgaudit and the logfile
Next
From: Gediminas Bazilevičius
Date:
Subject: how to hide configuration tab in pgadmin