Function inside query status

From: Rama Krishnan <raghuldrag(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Function inside query status
Date: 2022-06-30 06:57:43
Message-ID: CAJWX+EN7KBmA1MTsjz_-ZaC4ZM-=7oU5uo-nkWkp1YS6FhAoYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Is it possible to check the query execution status inside the function.

created or replace function data_purge() returns void as$$
Declare
Begin
Drop table test_old;
Create table test_old as select * from sales where bill_date<now()
-interval '1 year';

Delete table sales where sales_id in (select sales_id from test_old;

End;
$$ language plpgsql;

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amit Kapila 2022-06-30 08:16:24 Re: Support logical replication of DDLs
Previous Message Amit Kapila 2022-06-30 06:14:22 Re: Support logical replication of DDLs