Search Postgresql Archives

How to get response message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All, 

I am want to delete old records using function so my senior has function like below but I want to get response of this particular inside query wheter it is successful or failure

How to get response of the function status

 create 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;


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux